home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / pmake / RCS / kernel.mk,v < prev    next >
Encoding:
Text File  |  1992-11-28  |  54.1 KB  |  2,849 lines

  1. head     1.91;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.91
  10. date     92.11.27.17.17.37;  author jhh;  state Exp;
  11. branches ;
  12. next     1.90;
  13.  
  14. 1.90
  15. date     92.06.15.21.48.47;  author jhh;  state Exp;
  16. branches ;
  17. next     1.89;
  18.  
  19. 1.89
  20. date     92.06.15.21.32.54;  author jhh;  state Exp;
  21. branches ;
  22. next     1.88;
  23.  
  24. 1.88
  25. date     92.06.10.13.05.17;  author jhh;  state Exp;
  26. branches ;
  27. next     1.87;
  28.  
  29. 1.87
  30. date     92.04.13.18.26.04;  author jhh;  state Exp;
  31. branches ;
  32. next     1.86;
  33.  
  34. 1.86
  35. date     92.03.13.14.23.21;  author jhh;  state Exp;
  36. branches ;
  37. next     1.85;
  38.  
  39. 1.85
  40. date     92.01.06.12.36.28;  author kupfer;  state Exp;
  41. branches ;
  42. next     1.84;
  43.  
  44. 1.84
  45. date     91.12.13.13.40.25;  author jhh;  state Exp;
  46. branches ;
  47. next     1.83;
  48.  
  49. 1.83
  50. date     91.12.13.13.31.11;  author jhh;  state Exp;
  51. branches ;
  52. next     1.82;
  53.  
  54. 1.82
  55. date     91.10.18.10.23.58;  author jhh;  state Exp;
  56. branches ;
  57. next     1.81;
  58.  
  59. 1.81
  60. date     91.10.17.13.44.47;  author jhh;  state Exp;
  61. branches ;
  62. next     1.80;
  63.  
  64. 1.80
  65. date     91.10.08.23.05.32;  author rab;  state Exp;
  66. branches ;
  67. next     1.79;
  68.  
  69. 1.79
  70. date     91.08.15.11.46.50;  author jhh;  state Exp;
  71. branches ;
  72. next     1.78;
  73.  
  74. 1.78
  75. date     91.04.30.12.09.21;  author kupfer;  state Exp;
  76. branches ;
  77. next     1.77;
  78.  
  79. 1.77
  80. date     91.04.26.17.16.42;  author jhh;  state Exp;
  81. branches ;
  82. next     1.76;
  83.  
  84. 1.76
  85. date     90.11.15.23.14.53;  author shirriff;  state Exp;
  86. branches ;
  87. next     1.75;
  88.  
  89. 1.75
  90. date     90.11.02.08.37.49;  author rab;  state Exp;
  91. branches ;
  92. next     1.74;
  93.  
  94. 1.74
  95. date     90.08.17.15.55.20;  author douglis;  state Exp;
  96. branches ;
  97. next     1.73;
  98.  
  99. 1.73
  100. date     90.08.17.15.54.44;  author douglis;  state Exp;
  101. branches ;
  102. next     1.72;
  103.  
  104. 1.72
  105. date     90.07.05.21.30.37;  author jhh;  state Exp;
  106. branches ;
  107. next     1.71;
  108.  
  109. 1.71
  110. date     90.07.05.21.28.12;  author douglis;  state Exp;
  111. branches ;
  112. next     1.70;
  113.  
  114. 1.70
  115. date     90.04.21.11.34.43;  author ouster;  state Exp;
  116. branches ;
  117. next     1.69;
  118.  
  119. 1.69
  120. date     90.04.13.14.17.54;  author rab;  state Exp;
  121. branches ;
  122. next     1.68;
  123.  
  124. 1.68
  125. date     90.03.14.13.49.25;  author jhh;  state Exp;
  126. branches ;
  127. next     1.67;
  128.  
  129. 1.67
  130. date     90.03.12.23.25.23;  author jhh;  state Exp;
  131. branches ;
  132. next     1.66;
  133.  
  134. 1.66
  135. date     90.03.08.17.20.47;  author rab;  state Exp;
  136. branches ;
  137. next     1.65;
  138.  
  139. 1.65
  140. date     90.03.08.16.51.25;  author douglis;  state Exp;
  141. branches ;
  142. next     1.64;
  143.  
  144. 1.64
  145. date     90.03.05.11.01.06;  author douglis;  state Exp;
  146. branches ;
  147. next     1.63;
  148.  
  149. 1.63
  150. date     89.11.30.13.56.23;  author rab;  state Exp;
  151. branches ;
  152. next     1.62;
  153.  
  154. 1.62
  155. date     89.10.09.06.55.31;  author rab;  state Exp;
  156. branches ;
  157. next     1.61;
  158.  
  159. 1.61
  160. date     89.10.02.10.04.59;  author rab;  state Exp;
  161. branches ;
  162. next     1.60;
  163.  
  164. 1.60
  165. date     89.09.27.17.59.24;  author douglis;  state Exp;
  166. branches ;
  167. next     1.59;
  168.  
  169. 1.59
  170. date     89.09.27.12.31.36;  author douglis;  state Exp;
  171. branches ;
  172. next     1.58;
  173.  
  174. 1.58
  175. date     89.09.15.07.33.35;  author rab;  state Exp;
  176. branches ;
  177. next     1.57;
  178.  
  179. 1.57
  180. date     89.09.13.07.48.21;  author douglis;  state Exp;
  181. branches ;
  182. next     1.56;
  183.  
  184. 1.56
  185. date     89.09.06.04.54.10;  author rab;  state Exp;
  186. branches ;
  187. next     1.55;
  188.  
  189. 1.55
  190. date     89.08.31.16.10.46;  author rab;  state Exp;
  191. branches ;
  192. next     1.54;
  193.  
  194. 1.54
  195. date     89.08.31.13.09.13;  author jhh;  state Exp;
  196. branches ;
  197. next     1.53;
  198.  
  199. 1.53
  200. date     89.07.21.18.29.33;  author douglis;  state Exp;
  201. branches ;
  202. next     1.52;
  203.  
  204. 1.52
  205. date     89.07.20.17.36.00;  author mgbaker;  state Exp;
  206. branches ;
  207. next     1.51;
  208.  
  209. 1.51
  210. date     89.07.13.13.53.31;  author nelson;  state Exp;
  211. branches ;
  212. next     1.50;
  213.  
  214. 1.50
  215. date     89.06.23.23.45.26;  author jhh;  state Exp;
  216. branches ;
  217. next     1.49;
  218.  
  219. 1.49
  220. date     89.05.26.08.55.28;  author ouster;  state Exp;
  221. branches ;
  222. next     1.48;
  223.  
  224. 1.48
  225. date     89.05.26.08.42.21;  author rab;  state Exp;
  226. branches ;
  227. next     1.47;
  228.  
  229. 1.47
  230. date     89.03.23.15.54.52;  author douglis;  state Exp;
  231. branches ;
  232. next     1.46;
  233.  
  234. 1.46
  235. date     89.03.23.15.47.10;  author mendel;  state Exp;
  236. branches ;
  237. next     1.45;
  238.  
  239. 1.45
  240. date     89.01.06.09.21.44;  author ouster;  state Exp;
  241. branches ;
  242. next     1.44;
  243.  
  244. 1.44
  245. date     88.12.12.16.27.25;  author ouster;  state Exp;
  246. branches ;
  247. next     1.43;
  248.  
  249. 1.43
  250. date     88.12.04.13.50.35;  author ouster;  state Exp;
  251. branches ;
  252. next     1.42;
  253.  
  254. 1.42
  255. date     88.11.15.12.15.10;  author douglis;  state Exp;
  256. branches ;
  257. next     1.41;
  258.  
  259. 1.41
  260. date     88.11.11.23.54.06;  author jhh;  state Exp;
  261. branches ;
  262. next     1.40;
  263.  
  264. 1.40
  265. date     88.11.05.16.38.31;  author douglis;  state Exp;
  266. branches ;
  267. next     1.39;
  268.  
  269. 1.39
  270. date     88.10.31.12.41.12;  author mendel;  state Exp;
  271. branches ;
  272. next     1.38;
  273.  
  274. 1.38
  275. date     88.08.26.15.14.56;  author ouster;  state Exp;
  276. branches ;
  277. next     1.37;
  278.  
  279. 1.37
  280. date     88.08.26.14.35.47;  author ouster;  state Exp;
  281. branches ;
  282. next     1.36;
  283.  
  284. 1.36
  285. date     88.08.23.22.34.09;  author douglis;  state Exp;
  286. branches ;
  287. next     1.35;
  288.  
  289. 1.35
  290. date     88.08.23.16.39.47;  author douglis;  state Exp;
  291. branches ;
  292. next     1.34;
  293.  
  294. 1.34
  295. date     88.08.20.09.55.39;  author ouster;  state Exp;
  296. branches ;
  297. next     1.33;
  298.  
  299. 1.33
  300. date     88.08.19.15.50.37;  author ouster;  state Exp;
  301. branches ;
  302. next     1.32;
  303.  
  304. 1.32
  305. date     88.08.18.15.52.27;  author ouster;  state Exp;
  306. branches ;
  307. next     1.31;
  308.  
  309. 1.31
  310. date     88.08.18.15.20.14;  author ouster;  state Exp;
  311. branches ;
  312. next     1.30;
  313.  
  314. 1.30
  315. date     88.08.12.10.56.09;  author ouster;  state Exp;
  316. branches ;
  317. next     1.29;
  318.  
  319. 1.29
  320. date     88.08.12.10.54.08;  author brent;  state Exp;
  321. branches ;
  322. next     1.28;
  323.  
  324. 1.28
  325. date     88.08.11.11.12.18;  author douglis;  state Exp;
  326. branches ;
  327. next     1.27;
  328.  
  329. 1.27
  330. date     88.08.05.10.15.06;  author ouster;  state Exp;
  331. branches ;
  332. next     1.26;
  333.  
  334. 1.26
  335. date     88.08.01.16.31.01;  author ouster;  state Exp;
  336. branches ;
  337. next     1.25;
  338.  
  339. 1.25
  340. date     88.07.27.17.44.13;  author nelson;  state Exp;
  341. branches ;
  342. next     1.24;
  343.  
  344. 1.24
  345. date     88.07.27.17.35.56;  author ouster;  state Exp;
  346. branches ;
  347. next     1.23;
  348.  
  349. 1.23
  350. date     88.07.26.11.36.58;  author douglis;  state Exp;
  351. branches ;
  352. next     1.22;
  353.  
  354. 1.22
  355. date     88.07.05.17.03.41;  author mendel;  state Exp;
  356. branches ;
  357. next     1.21;
  358.  
  359. 1.21
  360. date     88.07.02.12.12.26;  author ouster;  state Exp;
  361. branches ;
  362. next     1.20;
  363.  
  364. 1.20
  365. date     88.06.28.12.01.34;  author douglis;  state Exp;
  366. branches ;
  367. next     1.19;
  368.  
  369. 1.19
  370. date     88.06.25.18.28.05;  author ouster;  state Exp;
  371. branches ;
  372. next     1.18;
  373.  
  374. 1.18
  375. date     88.06.21.17.47.47;  author ouster;  state Exp;
  376. branches ;
  377. next     1.17;
  378.  
  379. 1.17
  380. date     88.06.21.17.46.33;  author ouster;  state Exp;
  381. branches ;
  382. next     1.16;
  383.  
  384. 1.16
  385. date     88.06.21.17.33.48;  author douglis;  state Exp;
  386. branches ;
  387. next     1.15;
  388.  
  389. 1.15
  390. date     88.06.21.17.17.42;  author douglis;  state Exp;
  391. branches ;
  392. next     1.14;
  393.  
  394. 1.14
  395. date     88.06.17.14.52.55;  author ouster;  state Exp;
  396. branches ;
  397. next     1.13;
  398.  
  399. 1.13
  400. date     88.06.17.08.33.54;  author ouster;  state Exp;
  401. branches ;
  402. next     1.12;
  403.  
  404. 1.12
  405. date     88.06.15.17.13.55;  author ouster;  state Exp;
  406. branches ;
  407. next     1.11;
  408.  
  409. 1.11
  410. date     88.06.15.15.24.45;  author ouster;  state Exp;
  411. branches ;
  412. next     1.10;
  413.  
  414. 1.10
  415. date     88.06.13.16.39.21;  author ouster;  state Exp;
  416. branches ;
  417. next     1.9;
  418.  
  419. 1.9
  420. date     88.06.08.08.29.21;  author ouster;  state Exp;
  421. branches ;
  422. next     1.8;
  423.  
  424. 1.8
  425. date     88.06.06.17.22.49;  author ouster;  state Exp;
  426. branches ;
  427. next     1.7;
  428.  
  429. 1.7
  430. date     88.06.05.17.47.58;  author ouster;  state Exp;
  431. branches ;
  432. next     1.6;
  433.  
  434. 1.6
  435. date     88.06.05.17.40.26;  author ouster;  state Exp;
  436. branches ;
  437. next     1.5;
  438.  
  439. 1.5
  440. date     88.05.17.13.33.15;  author deboor;  state Exp;
  441. branches ;
  442. next     1.4;
  443.  
  444. 1.4
  445. date     88.04.29.18.33.34;  author deboor;  state Exp;
  446. branches ;
  447. next     1.3;
  448.  
  449. 1.3
  450. date     88.04.29.18.26.52;  author deboor;  state Exp;
  451. branches ;
  452. next     1.2;
  453.  
  454. 1.2
  455. date     88.03.28.12.56.42;  author deboor;  state Exp;
  456. branches ;
  457. next     1.1;
  458.  
  459. 1.1
  460. date     88.03.24.19.46.47;  author deboor;  state Exp;
  461. branches ;
  462. next     ;
  463.  
  464.  
  465. desc
  466. @Included makefile for kernel module source directory
  467. @
  468.  
  469.  
  470. 1.91
  471. log
  472. @added separate flags optimization and debugging flags for debug and default
  473. targets. Support for personal lint libraries.
  474. @
  475. text
  476. @#
  477. # This is a library Makefile that is included by the Makefile's for
  478. # modules of the Sprite kernel.  The file that includes this one should
  479. # already have defined the following variables:
  480. # Variables:
  481. #    NAME        module name
  482. #    SRCS        all sources for the module for the current target
  483. #            machine
  484. #    ALLSRCS        all sources for the module, including all sources
  485. #            for all target machines
  486. #    ALLHDRS        all headers for the module
  487. #    OBJS        object files from which to create the module
  488. #    CLEANOBJS    object files to be removed as part of "make clean"
  489. #            (need not just be object files)
  490. #    HDRS        all header files for the module
  491. #    PUBHDRS        publicly-available headers for the module (this
  492. #            contains only machine-independent headers)
  493. #    MDPUBHDRS    machine-dependent public headers for the module
  494. #            (for the current TM)
  495. #    TM        target machine type for object files etc.
  496. #    MACHINES    list of all target machines currently available
  497. #            for this program.
  498. #
  499. # "Make install" installs the source before the object.  This is because
  500. # make depend may get confused and have files depend on Include files rather
  501. # than header files in this directory, and doing an installhdrs after
  502. # making the object files might result in remaking all the object files a
  503. # second time.  
  504. #
  505. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.90 92/06/15 21:48:47 jhh Exp $ SPRITE (Berkeley)
  506. #
  507.  
  508. #
  509. # Default certain variables so that Pmake won't barf during "make newtm"
  510. # operations.
  511. #
  512. CLEANOBJS    ?=
  513. HDRS        ?=
  514. MDPUBHDRS    ?=
  515. OBJS        ?=
  516. SRCS        ?=
  517. INSTFILES    ?=
  518. SACREDOBJS    ?=
  519.  
  520. #
  521. # Important directories.
  522. #
  523. BINDIR        ?= /sprite/cmds.$(MACHINE)
  524. INCLUDEDIR    ?= /sprite/src/kernel/Include
  525. INSTALLDIR    ?= /sprite/src/kernel/Installed/$(NAME)
  526. LIBDIR        ?= /sprite/src/kernel/$(TM).md
  527. LINTDIR        ?= /sprite/src/kernel/Lint/$(TM).md
  528. PROFDIR        ?= /sprite/src/kernel/Profiled/$(TM).md
  529. USERINCLUDEDIR    ?= /sprite/lib/include
  530. SNAPDIR        ?= /sprite/src/kernel/Snapshots
  531.  
  532. CSRCS        ?= $(SRCS:M*.c)
  533. SSRCS        ?= $(SRCS:M*.s)
  534. POBJS        ?= $(OBJS:S/.o$/.po/g)
  535. GOBJS        ?= $(OBJS:S/.o$/.go/g)
  536. ALLCSRCS    ?= $(ALLSRCS:M*.c)
  537. MDHDRS        ?= $(HDRS:M*.md/*)
  538. MDSRCS        ?= $(SRCS:M*.md/*)
  539. MDINSTFILES    ?= $(INSTFILES:M*.md/*)
  540.  
  541. #
  542. # Define search paths for libraries, include files and lint libraries
  543. #
  544. .PATH.a        :
  545. .PATH.h        :
  546. #ifdef FIRSTHDRDIRS
  547. .PATH.h        : $(FIRSTHDRDIRS)
  548. #endif
  549. .PATH.h        : $(TM).md . $(INCLUDEDIR)/$(TM).md $(INCLUDEDIR) \
  550.             $(USERINCLUDEDIR)/$(TM).md $(USERINCLUDEDIR) 
  551. .PATH.ln    : 
  552. #ifdef MYLINTDIR
  553. .PATH.ln    : $(MYLINTDIR)
  554. #endif
  555. .PATH.ln    : $(LINTDIR)
  556. .PATH.c        :
  557. .PATH.c        : $(TM).md
  558. .PATH.s        :
  559. .PATH.s        : $(TM).md
  560.  
  561. #ifdef MYLINTDIR
  562. LINTINSTALLDIR = $(MYLINTDIR)
  563. #else
  564. LINTINSTALLDIR = $(LINTDIR)
  565. #endif 
  566.  
  567. #
  568. # System programs -- assign conditionally so they may be redefined in
  569. # including makefile.
  570. #
  571. AS        ?= $(BINDIR)/as
  572. CC        ?= $(BINDIR)/cc
  573. CP        ?= $(BINDIR)/cp
  574. CPP        ?= $(BINDIR)/cpp -traditional -$
  575. CTAGS        ?= $(BINDIR)/ctags
  576. ETAGS        ?= /emacs/cmds/etags
  577. LD        ?= $(BINDIR)/ld
  578. LINT        ?= $(BINDIR)/lint
  579. MV        ?= $(BINDIR)/mv
  580. MAKEDEPEND    ?= $(BINDIR)/makedepend
  581. MKDIR        ?= $(BINDIR)/mkdir
  582. RDIST        ?= $(BINDIR)/rdist
  583. RM        ?= $(BINDIR)/rm
  584. SCVS        ?= $(BINDIR)/scvs
  585. SED        ?= $(BINDIR)/sed
  586. TEST            ?= $(BINDIR)/test
  587. TOUCH        ?= $(BINDIR)/touch
  588. UPDATE        ?= $(BINDIR)/update
  589.  
  590. #
  591. # Figure out what stuff we'll pass to sub-makes.
  592. #
  593. PASSVARS    = 'INSTALLDIR=$(INSTALLDIR)' $(.MAKEFLAGS)
  594. #ifdef        XCFLAGS
  595. PASSVARS    += 'XCFLAGS=$(XCFLAGS)'
  596. #endif
  597. #ifdef        XAFLAGS
  598. PASSVARS    += 'XAFLAGS=$(XAFLAGS)'
  599. #endif
  600.  
  601. #
  602. # Flags. These are ones that are needed by *all* modules. Any other
  603. # ones should be added with the += operator in the local.mk makefile.
  604. # The FLAGS variables are defined with the += operator in case this file
  605. # is included after the main makefile has already defined them...
  606. #
  607.  
  608. #include    <tm.mk>
  609. CTFLAGS        ?= -wtd
  610. LINTFLAGS    ?= -m$(TM)
  611. LINTFLAGS    += -S -M -n -u -D$(TM)
  612. XCFLAGS        ?=
  613. XAFLAGS        ?=
  614.  
  615. #include <debugflags.mk>
  616.  
  617. # If we're compiling with gcc (i.e., on Suns), ask gcc to give all
  618. # warning messages.
  619.  
  620. #if empty(TM:Mds3100) && empty(TM:Mds5000)
  621. GFLAG += -Wall
  622. #endif
  623.  
  624. CFLAGS        += -DKERNEL $(TMCFLAGS) $(XCFLAGS) 
  625.  
  626. #
  627. # The .INCLUDES variable already includes directories that should be
  628. # used by cc and other programs by default.  Remove them, just so that
  629. # the command lines look cleaner.
  630. #
  631. # Since the dec compiler doesn't include /sprite/lib/include we must leave
  632. # the path as is when TM=ds3100.  Also the mips compiler doesn't include
  633. # /sprite/lib/include either so add these in for both as and cc.
  634. # For the sun4c, there is a problem with user include files pointing at
  635. # kernel include files, since the compiler will cause this sort of reference
  636. # to point at sun4 instead of sun4c, unless we specifically keep the reference
  637. # on the compile line.
  638. #
  639.  
  640. #if !empty(TM:Mds3100) || !empty(TM:Mds5000)
  641. CFLAGS          += $(.INCLUDES)
  642. AFLAGS          += $(.INCLUDES) $(TMAFLAGS) $(XAFLAGS) -DKERNEL
  643. #else if !empty(TM:Msun4c)
  644. CFLAGS          += $(.INCLUDES)
  645. AFLAGS        += $(TMAFLAGS) $(XAFLAGS) 
  646. #else
  647. CFLAGS        += $(.INCLUDES:S|^-I/sprite/lib/include$||g:S|^-I/sprite/lib/include/$(TM).md$||g)
  648. AFLAGS        += $(TMAFLAGS) $(XAFLAGS) 
  649. #endif
  650.  
  651. #
  652. # Floating point coprocessor instructions should not be used
  653. # inside the kernel.
  654. #
  655.  
  656. #if !empty(TM:Msun3) || !empty(TM:Mcleansun3)
  657. CFLAGS          += -msoft-float
  658. #endif
  659.  
  660. #
  661. # Transformation rules: these have special features to place .o files
  662. # in md subdirectories, run preprocessor over .s files, and generate
  663. # .po files for profiling.
  664. #
  665. ##    $(CC) -S $(CFLAGS) -p -DPROFILE $(.IMPSRC)
  666. ##    $(AS) -o $(.TARGET) $(AFLAGS) $(.PREFIX).s
  667. ##    $(RM) -f $(.PREFIX).s
  668.  
  669. .SUFFIXES    : .go .po
  670.  
  671. .c.o        :
  672.     $(RM) -f $(.TARGET)
  673.     $(CC) $(CFLAGS) $(OFLAG) $(GFLAG) -c $(.IMPSRC) -o $(.TARGET)
  674. .c.go        :
  675.     $(RM) -f $(.TARGET)
  676.     $(CC) $(CFLAGS)  $(GDFLAG) -c $(.IMPSRC) -o $(.TARGET)
  677. .c.po        :
  678.     $(RM) -f $(.TARGET)
  679.     $(CC) $(CFLAGS) $(OFLAG) $(GFLAG) -p -DPROFILE -c $(.IMPSRC) -o $(.TARGET)
  680. .s.po .s.o :
  681. #if empty(TM:Mds3100) && empty(TM:Mds5000)
  682.     $(CPP) $(CFLAGS:M-[IDU]*) -m$(TM) -D$(TM) -D_ASM $(.IMPSRC) > $(.PREFIX).pp
  683.     $(AS) -o $(.TARGET) $(AFLAGS) $(AGFLAG) $(.PREFIX).pp
  684.     $(RM) -f $(.PREFIX).pp
  685. #else
  686.     $(RM) -f $(.TARGET)
  687.     $(AS) $(AFLAGS) $(AGFLAG) $(.IMPSRC) -o $(.TARGET)
  688. #endif
  689.  
  690. .s.go :
  691. #if empty(TM:Mds3100) && empty(TM:Mds5000)
  692.     $(CPP) $(CFLAGS:M-[IDU]*) -m$(TM) -D$(TM) -D_ASM $(.IMPSRC) > $(.PREFIX).pp
  693.     $(AS) -o $(.TARGET) $(AFLAGS) $(AGDFLAG) $(.PREFIX).pp
  694.     $(RM) -f $(.PREFIX).pp
  695. #else
  696.     $(RM) -f $(.TARGET)
  697.     $(AS) $(AFLAGS) $(AGDFLAG) $(.IMPSRC) -o $(.TARGET)
  698. #endif
  699.  
  700.  
  701. #
  702. # MAKEDEPEND usage:
  703. #    <dependency-file> : <sources> MAKEDEPEND
  704. #
  705. # Generate dependency file suitable for inclusion in future makes.  Must
  706. # mung the dependency file in two ways:  a) add a .md prefix on all the .o
  707. # file names;  b) for each entry for a .o file, generate an equivalent
  708. # entry for a .po file.
  709.  
  710. MAKEDEPEND    : .USE
  711.     @@$(TOUCH) $(DEPFILE)
  712. #if empty(TM:Mds3100)  && empty(TM:Mds5000)
  713.     $(MAKEDEPEND) $(CFLAGS:M-[ID]*) -m $(TM) -w50 -f $(DEPFILE) $(.ALLSRC)
  714. #else
  715.     $(MAKEDEPEND) $(CFLAGS:M-[ID]*:S|^-I/sprite/lib/include$||g:S|^-I/sprite/lib/include/$(TM).md$||g) -m $(TM) -w50 -f $(DEPFILE) $(.ALLSRC)
  716. #endif
  717.     @@$(MV) -f $(DEPFILE) $(DEPFILE).tmp
  718.     @@$(SED) -e '/^#/!s|^\([^:]*\)\.o[     ]*:|$(TM).md/\1.po $(TM).md/\1.go $(TM).md/&|' <$(DEPFILE).tmp > $(DEPFILE)
  719.     @@$(RM) -f $(DEPFILE).tmp
  720.  
  721. #
  722. # Define the main targets.
  723. #
  724.  
  725. $(TM).md/$(NAME).o    : $(OBJS)
  726.     $(RM) -f $(.TARGET)
  727.     $(LD) -r $(LDFLAGS) $(.ALLSRC) -o $(.TARGET)
  728. $(TM).md/$(NAME).go    : $(GOBJS)
  729.     $(RM) -f $(.TARGET)
  730.     $(LD) -r $(LDFLAGS) $(.ALLSRC) -o $(.TARGET)
  731. default            : $(TM).md/$(NAME).o
  732. debug            : $(TM).md/$(NAME).go
  733.  
  734. clean tidy        :: .NOEXPORT
  735.     $(RM) -f $(CLEANOBJS) $(CLEANOBJS:S/.o$/.po/g) \
  736.         $(CLEANOBJS:S/.o$/.go/g) $(TM).md/$(NAME).o \
  737.         $(TM).md/$(NAME).po *~ $(TM).md/*~
  738.  
  739. DEPFILE = $(TM).md/dependencies.mk
  740. depend            : $(DEPFILE)
  741. $(DEPFILE)        ! $(SRCS:M*.c) $(SRCS:M*.s) MAKEDEPEND
  742.  
  743. install            :: installobj installhdrs
  744. #if !empty(TM:Mds3100) || !empty(TM:Mds5000)
  745. install            :: instlint 
  746. #endif
  747.  
  748. installhdrs        ::
  749.     @@$(UPDATE) -t -n $(PUBHDRS) $(INCLUDEDIR)
  750. #if !empty(MDPUBHDRS)
  751.     @@-$(MKDIR) $(INCLUDEDIR)/$(TM).md > /dev/null 2>&1
  752.     @@$(UPDATE) -t -n $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  753. #endif
  754. instlint        :: $(LINTINSTALLDIR)/$(NAME).ln
  755. installobj        :: $(LIBDIR)/$(NAME).o tags TAGS
  756. installdbg        :: $(LIBDIR)/$(NAME).go
  757.  
  758. $(LIBDIR)/$(NAME).o    : $(TM).md/$(NAME).o
  759.     $(UPDATE) -l -n $(TM).md/$(NAME).o $(LIBDIR)
  760. $(LIBDIR)/$(NAME).go    : $(TM).md/$(NAME).go
  761.     $(UPDATE) -l -n $(TM).md/$(NAME).go $(LIBDIR)
  762.  
  763. lint            : $(TM).md/lint
  764. $(TM).md/lint        : $(LINTLIBS) $(CSRCS) 
  765.     $(RM) -f $(.TARGET)
  766.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[IDU]*) $(.ALLSRC) \
  767.         > $(.TARGET) 2>& 1
  768. $(TM).md/llib-l$(NAME).ln    : $(CSRCS) $(HDRS)
  769.     $(RM) -f $(.TARGET)
  770.     $(RM) -f llib-l$(NAME).ln
  771.     $(LINT) -C$(NAME) $(CFLAGS:M-[IDU]*) $(LINTFLAGS) $(.ALLSRC:M*.c)
  772.     $(MV) llib-l$(NAME).ln $(.TARGET)
  773. $(LINTINSTALLDIR)/$(NAME).ln    : $(TM).md/llib-l$(NAME).ln
  774.     $(RM) -f $(.TARGET)
  775.     $(CP) $(TM).md/llib-l$(NAME).ln $(.TARGET)
  776.  
  777. mkmf            !
  778.     mkmf
  779.  
  780. newtm            ! .SILENT
  781.     if $(TEST) -d $(TM).md; then
  782.         true
  783.     else
  784.         mkdir $(TM).md;
  785.         chmod 775 $(TM).md;
  786.         mkmf -m$(TM)
  787.     fi
  788.  
  789. profile            :: $(TM).md/$(NAME).po
  790. $(TM).md/$(NAME).po    : $(POBJS)
  791.     $(RM) -f $(.TARGET)
  792.     $(LD) -r $(LDFLAGS) $(.ALLSRC) -o $(.TARGET)
  793.  
  794. tags            :: $(ALLCSRCS) $(HDRS)
  795.     $(CTAGS) $(CTFLAGS) $(ALLCSRCS) $(HDRS)
  796.  
  797. TAGS            :: $(ALLCSRCS) $(HDRS)
  798.     $(ETAGS) $(ALLCSRCS)
  799.  
  800. DISTFILES    ?=
  801.  
  802. dist            !
  803. #if defined(DISTDIR) && !empty(DISTDIR)
  804.     for i in Makefile local.mk $(TM).md/md.mk \
  805.         $(DISTFILES) $(SRCS) $(HDRS) $(SACREDOBJS)
  806.     do
  807.     if $(TEST) -e $${i}; then
  808.         $(UPDATE)  -l -n $${i} $(DISTDIR)/$${i} ;else true; fi
  809.     done
  810. #else
  811.     @@echo "Sorry, no distribution directory defined"
  812. #endif
  813.  
  814. #include    <all.mk>
  815.  
  816. # For rdist, take the standard kernel makefile.
  817. # Allow the user to specify extra flags (like -v) for the rdist via
  818. # the DISTFLAGS variable.
  819.  
  820. DISTFILE     ?= /sprite/lib/misc/distfile.kernel
  821. DISTFLAGS    ?= 
  822.  
  823. Rdist        :: 
  824.     $(RDIST) $(DISTFLAGS) -f $(DISTFILE) -d DIR=`pwd`
  825.  
  826. .MAKEFLAGS    : -C        # No compatibility needed
  827.  
  828. update        ::
  829.     $(SCVS) update
  830.  
  831. SNAPFLAGS    ?= 
  832.  
  833. snapshot        ::
  834. #ifdef SNAPVERSION
  835.     if $(TEST) -f $(SNAPDIR)/$(SNAPVERSION)/$(NAME)/.ssdone; then
  836.         true
  837.     else
  838.         for i in $(ALLSRCS) $(ALLHDRS) 
  839.         do 
  840.      $(UPDATE) $(SNAPFLAGS) $${i} $(SNAPDIR)/$(SNAPVERSION)/$(NAME)/$${i} 
  841.         done
  842.         $(TOUCH) $(SNAPDIR)/$(SNAPVERSION)/$(NAME)/.ssdone
  843.     fi
  844. #else
  845.     @@echo "You must specify a snapshot version number via SNAPVERSION
  846. #endif
  847.  
  848. listsrcs:
  849. #ifdef LISTFILE
  850.     @@echo $(ALLSRCS) $(ALLHDRS) | tr ' ' '\012' >> $(LISTFILE)
  851. #else
  852.     @@echo $(ALLSRCS) $(ALLHDRS)
  853. #endif
  854.  
  855. @
  856.  
  857.  
  858. 1.90
  859. log
  860. @added FIRSTHDRDIRS
  861. @
  862. text
  863. @d30 1
  864. a30 1
  865. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.89 92/06/15 21:32:54 jhh Exp Locker: jhh $ SPRITE (Berkeley)
  866. d77 3
  867. d86 6
  868. d149 1
  869. a149 1
  870. CFLAGS        += $(GFLAG) -DKERNEL $(TMCFLAGS) $(XCFLAGS) 
  871. d199 1
  872. a199 1
  873.     $(CC) $(CFLAGS) $(OFLAG) -c $(.IMPSRC) -o $(.TARGET)
  874. d202 1
  875. a202 1
  876.     $(CC) $(CFLAGS)  -c $(.IMPSRC) -o $(.TARGET)
  877. d205 12
  878. a216 2
  879.     $(CC) $(CFLAGS) $(OFLAG) -p -DPROFILE -c $(.IMPSRC) -o $(.TARGET)
  880. .s.po .s.o .s.go    :
  881. d219 1
  882. a219 1
  883.     $(AS) -o $(.TARGET) $(AFLAGS) $(.PREFIX).pp
  884. d223 1
  885. a223 1
  886.     $(AS) $(AFLAGS) $(.IMPSRC) -o $(.TARGET)
  887. d226 1
  888. d244 1
  889. a244 1
  890.     @@$(SED) -e '/^#/!s|^\([^:]*\)\.o[     ]*:|$(TM).md/\1.po $(TM).md/&|' <$(DEPFILE).tmp > $(DEPFILE)
  891. d280 1
  892. a280 1
  893. instlint        :: $(LINTDIR)/$(NAME).ln
  894. d299 1
  895. a299 1
  896. $(LINTDIR)/$(NAME).ln    : $(TM).md/llib-l$(NAME).ln
  897. d315 2
  898. a316 2
  899. profile            :: $(PROFDIR)/$(NAME).o
  900. $(PROFDIR)/$(NAME).o    : $(POBJS)
  901. @
  902.  
  903.  
  904. 1.89
  905. log
  906. @got rid of jhh and cleands3100 machine types, "clean" target removes
  907. .go files
  908. @
  909. text
  910. @d30 1
  911. a30 1
  912. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.88 92/06/10 13:05:17 jhh Exp $ SPRITE (Berkeley)
  913. d71 3
  914. @
  915.  
  916.  
  917. 1.88
  918. log
  919. @added debug target
  920. @
  921. text
  922. @d30 1
  923. a30 1
  924. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.87 92/04/13 18:26:04 jhh Exp $ SPRITE (Berkeley)
  925. d61 1
  926. a61 1
  927. ALLCSRCS    ?= $(ALLSRCS:M*.c:Nclean*:Njhh*)
  928. d133 1
  929. a133 1
  930. #if empty(TM:Mds3100) && empty(TM:Mjhh) && empty(TM:Mcleands3100) && empty(TM:Mds5000)
  931. d154 1
  932. a154 1
  933. #if !empty(TM:Mds3100) || !empty(TM:Mjhh) || !empty(TM:Mcleands3100) || !empty(TM:Mds5000)
  934. d215 1
  935. a215 1
  936. #if empty(TM:Mds3100)  && empty(TM:Mjhh) && empty(TM:Mcleands3100) && empty(TM:Mds5000)
  937. d238 2
  938. a239 1
  939.     $(RM) -f $(CLEANOBJS) $(CLEANOBJS:S/.o$/.po/g) $(TM).md/$(NAME).o \
  940. @
  941.  
  942.  
  943. 1.87
  944. log
  945. @changed the way snapshots are done
  946. @
  947. text
  948. @d30 1
  949. a30 1
  950. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.86 92/03/13 14:23:21 jhh Exp $ SPRITE (Berkeley)
  951. d60 1
  952. d137 1
  953. a137 1
  954. CFLAGS        += $(GFLAG) $(OFLAG) -DKERNEL $(TMCFLAGS) $(XCFLAGS)
  955. d183 1
  956. a183 1
  957. .SUFFIXES    : .po
  958. d187 4
  959. a190 1
  960.     $(CC) $(CFLAGS) -c $(.IMPSRC) -o $(.TARGET)
  961. d193 3
  962. a195 3
  963.     $(CC) $(CFLAGS) -p -DPROFILE -c $(.IMPSRC) -o $(.TARGET)
  964. .s.po .s.o    :
  965. #if empty(TM:Mds3100) && empty(TM:Mjhh) && empty(TM:Mcleands3100) && empty(TM:Mds5000)
  966. d231 3
  967. d235 1
  968. d258 2
  969. d262 2
  970. @
  971.  
  972.  
  973. 1.86
  974. log
  975. @header files are now passed to ctags, and the -d option makes it produce
  976. tags for #define's
  977. @
  978. text
  979. @d30 1
  980. a30 1
  981. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.85 92/01/06 12:36:28 kupfer Exp $ SPRITE (Berkeley)
  982. d243 1
  983. a243 1
  984.     @@$(UPDATE) -t -l -n $(PUBHDRS) $(INCLUDEDIR)
  985. d246 1
  986. a246 1
  987.     @@$(UPDATE) -t -l -n $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  988. d325 5
  989. a329 2
  990.     for i in $(ALLSRCS) $(ALLHDRS) 
  991.     do 
  992. d331 3
  993. a333 1
  994.     done
  995. d337 8
  996. @
  997.  
  998.  
  999. 1.85
  1000. log
  1001. @Make LINTFLAGS include -S, etc. even if tm.mk defines LINTFLAGS.  Pass
  1002. along any -U flags to lint and cpp (when making .o files).
  1003. @
  1004. text
  1005. @d30 1
  1006. a30 1
  1007. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.84 91/12/13 13:40:25 jhh Exp Locker: kupfer $ SPRITE (Berkeley)
  1008. d121 1
  1009. a121 1
  1010. CTFLAGS        ?= -wt
  1011. d285 1
  1012. a285 1
  1013.     $(CTAGS) $(CTFLAGS) $(ALLCSRCS)
  1014. @
  1015.  
  1016.  
  1017. 1.84
  1018. log
  1019. @added comment for ALLHDRS
  1020. @
  1021. text
  1022. @d30 1
  1023. a30 1
  1024. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.83 91/12/13 13:31:11 jhh Exp $ SPRITE (Berkeley)
  1025. d122 2
  1026. a123 1
  1027. LINTFLAGS    ?= -S -M -n -u -m$(TM) -D$(TM)
  1028. d192 1
  1029. a192 1
  1030.     $(CPP) $(CFLAGS:M-[ID]*) -m$(TM) -D$(TM) -D_ASM $(.IMPSRC) > $(.PREFIX).pp
  1031. d256 1
  1032. a256 1
  1033.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(.ALLSRC) \
  1034. d261 1
  1035. a261 1
  1036.     $(LINT) -C$(NAME) $(CFLAGS:M-[ID]*) $(LINTFLAGS) $(.ALLSRC:M*.c)
  1037. @
  1038.  
  1039.  
  1040. 1.83
  1041. log
  1042. @got rid of installsrc and rcssnapshot targets.  Added snapshot and 
  1043. update targets.
  1044. @
  1045. text
  1046. @d11 1
  1047. d30 1
  1048. a30 1
  1049. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.82 91/10/18 10:23:58 jhh Exp $ SPRITE (Berkeley)
  1050. @
  1051.  
  1052.  
  1053. 1.82
  1054. log
  1055. @only define asm flag -DKERNEL for decstations
  1056. @
  1057. text
  1058. @d29 1
  1059. a29 1
  1060. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.81 91/10/17 13:44:47 jhh Exp Locker: jhh $ SPRITE (Berkeley)
  1061. d54 1
  1062. d95 1
  1063. d235 1
  1064. a235 1
  1065. install            :: installobj installsrc
  1066. d247 1
  1067. a247 1
  1068. installobj        :: $(LIBDIR)/$(NAME).o
  1069. a249 11
  1070. installsrc        :: installhdrs
  1071. installsrc        ::
  1072.     @@rm -f $(INSTALLDIR)/*.[ch] 
  1073.     @@$(UPDATE) -l -n $(SRCS:N*.md/*) $(HDRS:N*.md/*) $(INSTFILES:N*.md/*) \
  1074.         $(INSTALLDIR)
  1075. #if !empty(MDSRCS) || !empty(MDHDRS) || !empty(SACREDOBJS)
  1076.     @@-$(MKDIR) $(INSTALLDIR)/$(TM).md > /dev/null 2>&1
  1077.     @@rm -f $(INSTALLDIR)/$(TM).md/*.[chs.o]        
  1078.     @@$(UPDATE) -l -n $(MDSRCS) $(MDHDRS) $(MDINSTFILES) $(SACREDOBJS) \
  1079.         $(INSTALLDIR)/$(TM).md
  1080. #endif
  1081. d316 4
  1082. a319 1
  1083. SNAPMACHINES    ?= sun3.md sun4.md ds3100.md
  1084. d321 9
  1085. a329 4
  1086. rcssnapshot        ::
  1087.     rcssnapshot -r${SNAPVERSION} ${SNAPNAME}
  1088.     -for i in ${SNAPMACHINES}; do \
  1089.         (cd $i ; rcssnapshot -r${SNAPVERSION} ${SNAPNAME}); done
  1090. @
  1091.  
  1092.  
  1093. 1.81
  1094. log
  1095. @assembler flags now have standard definitions
  1096. @
  1097. text
  1098. @d29 1
  1099. a29 1
  1100. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.80 91/10/08 23:05:32 rab Exp $ SPRITE (Berkeley)
  1101. d154 1
  1102. a154 1
  1103. AFLAGS        += $(TMAFLAGS) $(XAFLAGS) -DKERNEL
  1104. d157 1
  1105. a157 1
  1106. AFLAGS        += $(TMAFLAGS) $(XAFLAGS) -DKERNEL
  1107. @
  1108.  
  1109.  
  1110. 1.80
  1111. log
  1112. @Removed SOSP91.
  1113. @
  1114. text
  1115. @d29 1
  1116. a29 1
  1117. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.79 91/08/15 11:46:50 jhh Exp Locker: rab $ SPRITE (Berkeley)
  1118. d151 1
  1119. a151 1
  1120. AFLAGS          += $(.INCLUDES)
  1121. d154 1
  1122. a154 1
  1123. AFLAGS        += $(TMAFLAGS) $(XAFLAGS)
  1124. d157 1
  1125. a157 1
  1126. AFLAGS        += $(TMAFLAGS) $(XAFLAGS)
  1127. @
  1128.  
  1129.  
  1130. 1.79
  1131. log
  1132. @include paths are now absolute
  1133. @
  1134. text
  1135. @d29 1
  1136. a29 1
  1137. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.78 91/04/30 12:09:21 kupfer Exp $ SPRITE (Berkeley)
  1138. d132 1
  1139. a132 1
  1140. CFLAGS        += $(GFLAG) $(OFLAG) -DKERNEL -DSOSP91 $(TMCFLAGS) $(XCFLAGS)
  1141. @
  1142.  
  1143.  
  1144. 1.78
  1145. log
  1146. @Set GFLAG and OFLAG in debugflags.mk.
  1147. @
  1148. text
  1149. @d29 1
  1150. a29 1
  1151. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.77 91/04/26 17:16:42 jhh Exp Locker: kupfer $ SPRITE (Berkeley)
  1152. d48 5
  1153. a52 5
  1154. INCLUDEDIR    ?= ../Include
  1155. INSTALLDIR    ?= ../Installed/$(NAME)
  1156. LIBDIR        ?= ../$(TM).md
  1157. LINTDIR        ?= ../Lint/$(TM).md
  1158. PROFDIR        ?= ../Profiled/$(TM).md
  1159. @
  1160.  
  1161.  
  1162. 1.77
  1163. log
  1164. @added SOSP91 flag to CFLAGS
  1165. @
  1166. text
  1167. @d29 1
  1168. a29 1
  1169. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.76 90/11/15 23:14:53 shirriff Exp Locker: jhh $ SPRITE (Berkeley)
  1170. d123 4
  1171. a126 10
  1172. #ifndef NOOPTIMIZATION
  1173. #if !empty(TM:Mds3100) || !empty(TM:Mjhh) || !empty(TM:Mcleands3100) || !empty(TM:Mds5000)
  1174. GFLAG = -g3
  1175. #else
  1176. GFLAG = -g
  1177. #endif
  1178. CFLAGS        += $(GFLAG) -O -DKERNEL -DSOSP91 $(TMCFLAGS) $(XCFLAGS) 
  1179. #else
  1180. CFLAGS        += -g -DKERNEL -DSOSP91 $(TMCFLAGS) $(XCFLAGS) 
  1181. #endif
  1182. d131 2
  1183. @
  1184.  
  1185.  
  1186. 1.76
  1187. log
  1188. @Changes for ds5000
  1189. @
  1190. text
  1191. @d29 1
  1192. a29 1
  1193. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.75 90/11/02 08:37:49 rab Exp Locker: shirriff $ SPRITE (Berkeley)
  1194. d129 1
  1195. a129 1
  1196. CFLAGS        += $(GFLAG) -O -DKERNEL $(TMCFLAGS) $(XCFLAGS)
  1197. d131 1
  1198. a131 1
  1199. CFLAGS        += -g -DKERNEL $(TMCFLAGS) $(XCFLAGS)
  1200. d237 5
  1201. a241 1
  1202. install            :: installobj instlint installsrc
  1203. @
  1204.  
  1205.  
  1206. 1.75
  1207. log
  1208. @Added -Wall to CFLAGS.
  1209. Fixed profiling to not compile via assembly.
  1210. Changed SACRED_OBJS to SACREDOBJS.
  1211. @
  1212. text
  1213. @d29 1
  1214. a29 1
  1215. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.74 90/08/17 15:55:20 douglis Exp Locker: rab $ SPRITE (Berkeley)
  1216. d124 1
  1217. a124 1
  1218. #if !empty(TM:Mds3100) || !empty(TM:Mjhh) || !empty(TM:Mcleands3100)
  1219. d134 1
  1220. a134 1
  1221. #if empty(TM:Mds3100) && empty(TM:Mjhh) && empty(TM:Mcleands3100)
  1222. d153 1
  1223. a153 1
  1224. #if !empty(TM:Mds3100) || !empty(TM:Mjhh) || !empty(TM:Mcleands3100)
  1225. d191 1
  1226. a191 1
  1227. #if empty(TM:Mds3100) && empty(TM:Mjhh) && empty(TM:Mcleands3100)
  1228. d211 1
  1229. a211 1
  1230. #if empty(TM:Mds3100)  && empty(TM:Mjhh) && empty(TM:Mcleands3100)
  1231. @
  1232.  
  1233.  
  1234. 1.74
  1235. log
  1236. @do rm -f or else it may not remove unwritable files, it seems.
  1237. @
  1238. text
  1239. @d29 1
  1240. a29 1
  1241. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.73 90/08/17 15:54:44 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  1242. d134 4
  1243. d178 3
  1244. d189 1
  1245. a189 3
  1246.     $(CC) -S $(CFLAGS) -p -DPROFILE $(.IMPSRC)
  1247.     $(AS) -o $(.TARGET) $(AFLAGS) $(.PREFIX).s
  1248.     $(RM) -f $(.PREFIX).s
  1249. d289 1
  1250. a289 1
  1251.     $(LD) -o $(.TARGET) -r $(.ALLSRC)
  1252. d302 1
  1253. a302 1
  1254.         $(DISTFILES) $(SRCS) $(HDRS) $(SACRED_OBJS)
  1255. @
  1256.  
  1257.  
  1258. 1.73
  1259. log
  1260. @ken's changes.  dunno.
  1261. @
  1262. text
  1263. @d29 1
  1264. a29 1
  1265. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.72 90/07/05 21:30:37 jhh Exp Locker: shirriff $ SPRITE (Berkeley)
  1266. d245 1
  1267. a245 1
  1268.     @@rm $(INSTALLDIR)/*.[ch] 
  1269. d250 1
  1270. a250 1
  1271.     @@rm $(INSTALLDIR)/$(TM).md/*.[chs.o]        
  1272. @
  1273.  
  1274.  
  1275. 1.72
  1276. log
  1277. @copies targets of symbolic links when installing, rather than copying
  1278. the links themselves.
  1279. @
  1280. text
  1281. @d29 1
  1282. a29 1
  1283. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.70 90/04/21 11:34:43 ouster Exp Locker: douglis $ SPRITE (Berkeley)
  1284. d234 1
  1285. a234 1
  1286.     @@$(UPDATE) -t -l $(PUBHDRS) $(INCLUDEDIR)
  1287. d237 1
  1288. a237 1
  1289.     @@$(UPDATE) -t -l $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  1290. d242 1
  1291. a242 1
  1292.     $(UPDATE) -l $(TM).md/$(NAME).o $(LIBDIR)
  1293. d246 1
  1294. a246 1
  1295.     @@$(UPDATE) -l $(SRCS:N*.md/*) $(HDRS:N*.md/*) $(INSTFILES:N*.md/*) \
  1296. d251 1
  1297. a251 1
  1298.     @@$(UPDATE) -l $(MDSRCS) $(MDHDRS) $(MDINSTFILES) $(SACREDOBJS) \
  1299. d300 1
  1300. a300 1
  1301.         $(UPDATE)  -l $${i} $(DISTDIR)/$${i} ;else true; fi
  1302. @
  1303.  
  1304.  
  1305. 1.71
  1306. log
  1307. @checking this in for Fred -- John H.
  1308. @
  1309. text
  1310. @d234 1
  1311. a234 1
  1312.     @@$(UPDATE) -t $(PUBHDRS) $(INCLUDEDIR)
  1313. d237 1
  1314. a237 1
  1315.     @@$(UPDATE) -t $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  1316. d242 1
  1317. a242 1
  1318.     $(UPDATE) $(TM).md/$(NAME).o $(LIBDIR)
  1319. d246 1
  1320. a246 1
  1321.     @@$(UPDATE) $(SRCS:N*.md/*) $(HDRS:N*.md/*) $(INSTFILES:N*.md/*) \
  1322. d251 1
  1323. a251 1
  1324.     @@$(UPDATE) $(MDSRCS) $(MDHDRS) $(MDINSTFILES) $(SACREDOBJS) \
  1325. d300 1
  1326. a300 1
  1327.         $(UPDATE)  $${i} $(DISTDIR)/$${i} ;else true; fi
  1328. @
  1329.  
  1330.  
  1331. 1.70
  1332. log
  1333. @Don't include header files explicitly in list of things to be
  1334. linted: some header files can only be #include-d in context.
  1335. @
  1336. text
  1337. @d29 1
  1338. a29 1
  1339. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.69 90/04/13 14:17:54 rab Exp Locker: ouster $ SPRITE (Berkeley)
  1340. d58 1
  1341. a58 1
  1342. ALLCSRCS    ?= $(ALLSRCS:M*.c)
  1343. @
  1344.  
  1345.  
  1346. 1.69
  1347. log
  1348. @Added SACRED_OBJS to distribution.
  1349. @
  1350. text
  1351. @d29 1
  1352. a29 1
  1353. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.68 90/03/14 13:49:25 jhh Exp Locker: rab $ SPRITE (Berkeley)
  1354. d256 1
  1355. a256 1
  1356. $(TM).md/lint        : $(LINTLIBS) $(CSRCS) $(HDRS) 
  1357. d258 1
  1358. a258 1
  1359.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(.ALLSRC:N*.h) \
  1360. @
  1361.  
  1362.  
  1363. 1.68
  1364. log
  1365. @defines SACREDOBJS if they aren't defined already
  1366. @
  1367. text
  1368. @d29 1
  1369. a29 1
  1370. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.67 90/03/12 23:25:23 jhh Exp $ SPRITE (Berkeley)
  1371. d296 2
  1372. a297 1
  1373.     for i in Makefile local.mk $(TM).md/md.mk $(DISTFILES) $(SRCS) $(HDRS)
  1374. @
  1375.  
  1376.  
  1377. 1.67
  1378. log
  1379. @added support for compiling snapshots of the kernel sources
  1380. @
  1381. text
  1382. @d29 1
  1383. a29 1
  1384. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.66 90/03/08 17:20:47 rab Exp Locker: jhh $ SPRITE (Berkeley)
  1385. d42 1
  1386. @
  1387.  
  1388.  
  1389. 1.66
  1390. log
  1391. @ Remove old installed stuff before installed the new stuff so old unused
  1392. files don't sit around forever.
  1393. @
  1394. text
  1395. @d29 1
  1396. a29 1
  1397. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.65 90/03/08 16:51:25 douglis Exp Locker: rab $ SPRITE (Berkeley)
  1398. d41 1
  1399. d52 1
  1400. d60 1
  1401. d68 1
  1402. a68 1
  1403.             /sprite/lib/include/$(TM).md /sprite/lib/include 
  1404. d245 3
  1405. a247 2
  1406.     @@$(UPDATE) $(SRCS:N*.md/*) $(HDRS:N*.md/*) $(INSTALLDIR)
  1407. #if !empty(MDSRCS) || !empty(MDHDRS)
  1408. d249 3
  1409. a251 2
  1410.     @@rm $(INSTALLDIR)/$(TM).md/*.[chs]        
  1411.     @@$(UPDATE) $(MDSRCS) $(MDHDRS) $(INSTALLDIR)/$(TM).md
  1412. @
  1413.  
  1414.  
  1415. 1.65
  1416. log
  1417. @handle recursive makes of TAGS file.
  1418. @
  1419. text
  1420. @d29 1
  1421. a29 1
  1422. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.64 90/03/05 11:01:06 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  1423. d241 1
  1424. d245 1
  1425. @
  1426.  
  1427.  
  1428. 1.64
  1429. log
  1430. @rab changes for dist
  1431. @
  1432. text
  1433. @d29 1
  1434. a29 1
  1435. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.63 89/11/30 13:56:23 rab Exp Locker: rab $ SPRITE (Berkeley)
  1436. d82 1
  1437. d280 3
  1438. @
  1439.  
  1440.  
  1441. 1.63
  1442. log
  1443. @Changed dist: to dist!,
  1444. @
  1445. text
  1446. @d29 1
  1447. a29 1
  1448. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.62 89/10/09 06:55:31 rab Exp Locker: rab $ SPRITE (Berkeley)
  1449. d284 1
  1450. a284 1
  1451.     for i in Makefile local.mk $(TM).md/md.mk $(SRCS) $(HDRS) $(DISTFILES)
  1452. @
  1453.  
  1454.  
  1455. 1.62
  1456. log
  1457. @Fixed distribution stuff.
  1458. @
  1459. text
  1460. @d29 1
  1461. a29 1
  1462. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.61 89/10/02 10:04:59 rab Exp Locker: rab $ SPRITE (Berkeley)
  1463. d280 1
  1464. a280 1
  1465. DISTOBJS    ?=
  1466. d282 1
  1467. a282 1
  1468. dist:
  1469. d284 1
  1470. a284 1
  1471.     for i in Makefile local.mk $(TM).md/md.mk $(SRCS) $(HDRS) $(DISTOBJS)
  1472. @
  1473.  
  1474.  
  1475. 1.61
  1476. log
  1477. @Added Distribution stuff.
  1478. @
  1479. text
  1480. @d29 1
  1481. a29 1
  1482. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.60 89/09/27 17:59:24 douglis Exp Locker: rab $ SPRITE (Berkeley)
  1483. d90 1
  1484. d264 1
  1485. a264 1
  1486.     if test -d $(TM).md; then
  1487. d280 2
  1488. d286 2
  1489. a287 1
  1490.     if test -e $${i}; then $(UPDATE)  $${i} $(DISTDIR)/$${i} ;fi
  1491. @
  1492.  
  1493.  
  1494. 1.60
  1495. log
  1496. @enable -O for ds3100, with -g3 when needed
  1497. @
  1498. text
  1499. @d29 1
  1500. a29 1
  1501. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.59 89/09/27 12:31:36 douglis Exp Locker: douglis $ SPRITE (Berkeley)
  1502. d278 10
  1503. @
  1504.  
  1505.  
  1506. 1.59
  1507. log
  1508. @added clean* targets
  1509. @
  1510. text
  1511. @d29 1
  1512. a29 1
  1513. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.58 89/09/15 07:33:35 rab Exp Locker: douglis $ SPRITE (Berkeley)
  1514. d118 6
  1515. a123 1
  1516. CFLAGS        += -g -O -DKERNEL $(TMCFLAGS) $(XCFLAGS)
  1517. @
  1518.  
  1519.  
  1520. 1.58
  1521. log
  1522. @Added -m$(TM) flag to cpp.
  1523. @
  1524. text
  1525. @d29 1
  1526. a29 1
  1527. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.57 89/09/13 07:48:21 douglis Exp Locker: rab $ SPRITE (Berkeley)
  1528. d138 1
  1529. a138 1
  1530. #if !empty(TM:Mds3100) || !empty(TM:Mjhh)
  1531. d154 1
  1532. a154 1
  1533. #if !empty(TM:Msun3)
  1534. d175 1
  1535. a175 1
  1536. #if empty(TM:Mds3100) && empty(TM:Mjhh)
  1537. d195 1
  1538. a195 1
  1539. #if empty(TM:Mds3100)  && empty(TM:Mjhh)
  1540. @
  1541.  
  1542.  
  1543. 1.57
  1544. log
  1545. @rcssnapshot default machines changed
  1546. @
  1547. text
  1548. @d29 1
  1549. a29 1
  1550. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.56 89/09/06 04:54:10 rab Exp Locker: douglis $ SPRITE (Berkeley)
  1551. d176 1
  1552. a176 1
  1553.     $(CPP) $(CFLAGS:M-[ID]*) -D$(TM) -D_ASM $(.IMPSRC) > $(.PREFIX).pp
  1554. @
  1555.  
  1556.  
  1557. 1.56
  1558. log
  1559. @Added -msoft-float switch for sun3.
  1560. @
  1561. text
  1562. @d29 1
  1563. a29 1
  1564. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.55 89/08/31 16:10:46 rab Exp Locker: rab $ SPRITE (Berkeley)
  1565. d288 1
  1566. a288 1
  1567. SNAPMACHINES    ?= sun3.md
  1568. @
  1569.  
  1570.  
  1571. 1.55
  1572. log
  1573. @Added -D_ASM to .s.o rule.
  1574. @
  1575. text
  1576. @d29 1
  1577. a29 1
  1578. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.54 89/08/31 13:09:13 jhh Exp Locker: rab $ SPRITE (Berkeley)
  1579. d147 9
  1580. @
  1581.  
  1582.  
  1583. 1.54
  1584. log
  1585. @made jhh machine type the same as a ds3100
  1586. @
  1587. text
  1588. @d29 1
  1589. a29 1
  1590. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.53 89/07/21 18:29:33 douglis Exp Locker: jhh $ SPRITE (Berkeley)
  1591. d167 1
  1592. a167 1
  1593.     $(CPP) $(CFLAGS:M-[ID]*) -D$(TM) $(.IMPSRC) > $(.PREFIX).pp
  1594. @
  1595.  
  1596.  
  1597. 1.53
  1598. log
  1599. @changed newtm to do mkmf for only the new machine type
  1600. @
  1601. text
  1602. @d29 1
  1603. a29 1
  1604. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.52 89/07/20 17:36:00 mgbaker Exp Locker: douglis $ SPRITE (Berkeley)
  1605. d132 4
  1606. d138 1
  1607. a138 1
  1608. #if !empty(TM:Mds3100)
  1609. d141 3
  1610. d166 1
  1611. a166 1
  1612. #if empty(TM:Mds3100)
  1613. d186 1
  1614. d188 3
  1615. @
  1616.  
  1617.  
  1618. 1.52
  1619. log
  1620. @Got rid of extra porting stuff for sun4.
  1621. @
  1622. text
  1623. @d29 1
  1624. a29 1
  1625. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.51 89/07/13 13:53:31 nelson Exp Locker: mgbaker $ SPRITE (Berkeley)
  1626. d243 1
  1627. a243 1
  1628.         mkmf
  1629. @
  1630.  
  1631.  
  1632. 1.51
  1633. log
  1634. @Added ds3100 support.
  1635. @
  1636. text
  1637. @d29 1
  1638. a29 1
  1639. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.50 89/06/23 23:45:26 jhh Exp $ SPRITE (Berkeley)
  1640. d129 2
  1641. a130 2
  1642. # Since the sun4 compiler doesn't include /sprite/lib/include we must leave
  1643. # the path as is when TM=sun4.  Also the mips compiler doesn't include
  1644. d134 1
  1645. a134 5
  1646. #if !empty(TM:Msun4)
  1647. CFLAGS        += $(.INCLUDES)
  1648. AFLAGS        += $(TMAFLAGS) $(XAFLAGS)
  1649.  
  1650. #elif !empty(TM:Mds3100)
  1651. @
  1652.  
  1653.  
  1654. 1.50
  1655. log
  1656. @moved "." after $(TM).md in include path so you get machine dependent
  1657. versions before machine independent
  1658. @
  1659. text
  1660. @d29 1
  1661. a29 1
  1662. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.49 89/05/26 08:55:28 ouster Exp Locker: jhh $ SPRITE (Berkeley)
  1663. d130 2
  1664. a131 1
  1665. # the path as is when TM=sun4.
  1666. d134 8
  1667. a141 1
  1668. #if empty(TM:Msun4)
  1669. d143 1
  1670. a143 2
  1671. #else
  1672. CFLAGS        += $(.INCLUDES)
  1673. a144 1
  1674. AFLAGS        += $(TMAFLAGS) $(XAFLAGS)
  1675. d163 1
  1676. d167 4
  1677. d194 1
  1678. a194 1
  1679.     $(LD) -r $(.ALLSRC) -o $(.TARGET)
  1680. @
  1681.  
  1682.  
  1683. 1.49
  1684. log
  1685. @Added NOOPTIMIZATION variable to disable -O switch.
  1686. @
  1687. text
  1688. @d29 1
  1689. a29 1
  1690. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.48 89/05/26 08:42:21 rab Exp Locker: ouster $ SPRITE (Berkeley)
  1691. d64 1
  1692. a64 1
  1693. .PATH.h        : $(TM).md $(INCLUDEDIR)/$(TM).md $(INCLUDEDIR) \
  1694. d118 1
  1695. a118 1
  1696. CFLAGS        += -g -O -DKERNEL $(TMCFLAGS) $(XCFLAGS) -I.
  1697. d120 1
  1698. a120 1
  1699. CFLAGS        += -g -DKERNEL $(TMCFLAGS) $(XCFLAGS) -I.
  1700. @
  1701.  
  1702.  
  1703. 1.48
  1704. log
  1705. @*** empty log message ***
  1706. @
  1707. text
  1708. @d29 1
  1709. a29 1
  1710. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.47 89/03/23 15:54:52 douglis Exp $ SPRITE (Berkeley)
  1711. d116 7
  1712. a127 2
  1713. CFLAGS        += -g -O -DKERNEL $(TMCFLAGS) $(XCFLAGS) -I.
  1714.  
  1715. @
  1716.  
  1717.  
  1718. 1.47
  1719. log
  1720. @removed the -l option to update -- go back to installing
  1721. symbolic links, to reflect reality.
  1722. @
  1723. text
  1724. @d29 1
  1725. a29 1
  1726. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.46 89/03/23 15:47:10 mendel Exp Locker: douglis $ SPRITE (Berkeley)
  1727. d64 2
  1728. a65 2
  1729. .PATH.h        : $(TM).md $(INCLUDEDIR) $(INCLUDEDIR)/$(TM).md \
  1730.             /sprite/lib/include /sprite/lib/include/$(TM).md
  1731. d121 2
  1732. a122 1
  1733. CFLAGS        += -g -DKERNEL $(TMCFLAGS) $(XCFLAGS) -I.
  1734. d181 1
  1735. a181 1
  1736. clean            :: .NOEXPORT
  1737. @
  1738.  
  1739.  
  1740. 1.46
  1741. log
  1742. @Patch on compiling with the sun4 compiler runing on unix.
  1743. @
  1744. text
  1745. @d29 1
  1746. a29 1
  1747. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.45 89/01/06 09:21:44 ouster Exp Locker: mendel $ SPRITE (Berkeley)
  1748. d190 1
  1749. a190 1
  1750.     @@$(UPDATE) -l -t $(PUBHDRS) $(INCLUDEDIR)
  1751. d193 1
  1752. a193 1
  1753.     @@$(UPDATE) -l -t $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  1754. d201 1
  1755. a201 1
  1756.     @@$(UPDATE) -l $(SRCS:N*.md/*) $(HDRS:N*.md/*) $(INSTALLDIR)
  1757. d204 1
  1758. a204 1
  1759.     @@$(UPDATE) -l $(MDSRCS) $(MDHDRS) $(INSTALLDIR)/$(TM).md
  1760. @
  1761.  
  1762.  
  1763. 1.45
  1764. log
  1765. @Additional definitions so "make newtm" will work.
  1766. @
  1767. text
  1768. @d29 1
  1769. a29 1
  1770. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.44 88/12/12 16:27:25 ouster Exp $ SPRITE (Berkeley)
  1771. d122 6
  1772. d129 3
  1773. @
  1774.  
  1775.  
  1776. 1.44
  1777. log
  1778. @Added back "-M" flag.
  1779.  
  1780. @
  1781. text
  1782. @d29 1
  1783. a29 1
  1784. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.43 88/12/04 13:50:35 ouster Exp $ SPRITE (Berkeley)
  1785. d33 2
  1786. a34 2
  1787. # The code below is here temporarily for compatibility, while MODULE gets
  1788. # renamed to NAME.
  1789. d36 5
  1790. a40 4
  1791.  
  1792. #ifdef MODULE
  1793. NAME        = $(MODULE)
  1794. #endif
  1795. @
  1796.  
  1797.  
  1798. 1.43
  1799. log
  1800. @"Final" (?) changes to kick in new C library.
  1801. @
  1802. text
  1803. @d29 1
  1804. a29 1
  1805. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.42 88/11/15 12:15:10 douglis Exp Locker: ouster $ SPRITE (Berkeley)
  1806. d112 1
  1807. a112 1
  1808. LINTFLAGS    ?= -S -n -u -m$(TM) -D$(TM)
  1809. @
  1810.  
  1811.  
  1812. 1.42
  1813. log
  1814. @pass -D$(TM) to lint
  1815. @
  1816. text
  1817. @d2 3
  1818. a4 1
  1819. # Included makefile for creating a kernel module.
  1820. d6 1
  1821. a6 1
  1822. #    MODULE        module name
  1823. d21 1
  1824. a21 7
  1825. #            for this program.  For each type <x> in this
  1826. #            variable, the following targets are created:
  1827. #            <x>        does a 'make' for <x>
  1828. #            lint<x>        does 'make lint' for <x>
  1829. #            profile<x>    does 'make profile' for <x>
  1830. #            install<x>    does 'make install' for <x>
  1831. #            instlint<x>    does 'make instlint' for <x>.
  1832. d29 1
  1833. a29 1
  1834. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.41 88/11/11 23:54:06 jhh Exp Locker: douglis $ SPRITE (Berkeley)
  1835. d32 12
  1836. d46 1
  1837. a46 1
  1838. INSTALLDIR    ?= ../Installed/$(MODULE)
  1839. a61 2
  1840. .PATH.a        : /sprite/lib /sprite/att/lib
  1841. #ifndef OLDLIB
  1842. a63 5
  1843.         /sprite/lib/include.new /sprite/lib/include.new/$(TM).md \
  1844.         /sprite/lib/include.old /sprite/lib/include.old/$(TM).md
  1845. #else
  1846. .PATH.h        :
  1847. .PATH.h        : $(TM).md $(INCLUDEDIR) $(INCLUDEDIR)/$(TM).md \
  1848. a64 1
  1849. #endif
  1850. d76 2
  1851. a77 6
  1852. #ifndef OLDLIB
  1853. CC        = /sprite/cmds.${MACHINE}/gcc
  1854. #else
  1855. CC        ?= /sprite/cmds/cc
  1856. #endif
  1857. AS        ?= /sprite/cmds/as
  1858. d81 1
  1859. a81 1
  1860. LD        ?= /sprite/cmds/ld
  1861. d104 2
  1862. a105 2
  1863. # Flags. These are ones that are needed by *all* programs. Any other
  1864. # ones should be added with the += operator in the command-specific makefile.
  1865. d110 3
  1866. a112 1
  1867. #include    <tmflags.mk>
  1868. d115 7
  1869. a121 3
  1870. CTFLAGS        ?=
  1871. LINTFLAGS    ?= -S -n -u -m$(TM) -D$(TM)
  1872. CFLAGS        += $(TMCFLAGS) -DKERNEL -I. $(.INCLUDES) $(.LIBS) $(XCFLAGS)
  1873. d141 1
  1874. a141 1
  1875.     $(CPP) $(CFLAGS:M-[ID]*) $(.IMPSRC) > $(.PREFIX).pp
  1876. d162 1
  1877. a162 4
  1878. # Define the main targets (make, make install, make lint,
  1879. # make clean, make depend).  For each general target type, three
  1880. # different specifications are possible to control which target
  1881. # machines apply:
  1882. a163 10
  1883. # 1. specify the target generically:  "make" or "make install"; this
  1884. #    will make for the machine defined in the TM variable (which
  1885. #    can be overridden on the command line).
  1886. # 2. specify the target by appending a machine name: "make sun3" or
  1887. #    "make installsun3":  this will make the given target for the
  1888. #    given machine.
  1889. # 3. specify the target by appending "all": "make all" or "make installall";
  1890. #    this will run several makes to make the given target for all known
  1891. #    machine types.
  1892. #
  1893. d165 1
  1894. a165 1
  1895. $(TM).md/$(MODULE).o    : $(OBJS)
  1896. d168 1
  1897. d170 3
  1898. a172 5
  1899. $(TM).md/llib-l$(MODULE).ln    : $(CSRCS) $(HDRS)
  1900.     $(RM) -f $(.TARGET)
  1901.     $(RM) -f llib-l$(MODULE).ln
  1902.     $(LINT) -C$(MODULE) $(CFLAGS:M-[ID]*) $(LINTFLAGS) $(.ALLSRC:M*.c)
  1903.     $(MV) llib-l$(MODULE).ln $(.TARGET)
  1904. d174 3
  1905. a176 3
  1906. $(LINTDIR)/$(MODULE).ln : $(TM).md/llib-l$(MODULE).ln
  1907.     $(RM) -f $(.TARGET)
  1908.     $(CP) $(TM).md/llib-l$(MODULE).ln $(.TARGET)
  1909. a177 7
  1910. $(LIBDIR)/$(MODULE).o    : $(TM).md/$(MODULE).o
  1911.     $(UPDATE) $(TM).md/$(MODULE).o $(LIBDIR)
  1912.  
  1913. $(PROFDIR)/$(MODULE).o    : $(POBJS)
  1914.     $(RM) -f $(.TARGET)
  1915.     $(LD) -o $(.TARGET) -r $(.ALLSRC)
  1916.  
  1917. d179 10
  1918. a188 2
  1919. installobj        :: $(LIBDIR)/$(MODULE).o
  1920. instlint        :: $(LINTDIR)/$(MODULE).ln
  1921. a195 6
  1922. installhdrs        ::
  1923.     @@$(UPDATE) -l -t $(PUBHDRS) $(INCLUDEDIR)
  1924. #if !empty(MDPUBHDRS)
  1925.     @@-$(MKDIR) $(INCLUDEDIR)/$(TM).md > /dev/null 2>&1
  1926.     @@$(UPDATE) -l -t $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  1927. #endif
  1928. a196 1
  1929. profile            :: $(PROFDIR)/$(MODULE).o
  1930. d202 8
  1931. d211 2
  1932. a212 3
  1933. DEPFILE = $(TM).md/dependencies.mk
  1934. depend            : $(DEPFILE)
  1935. $(DEPFILE)        ! $(SRCS:M*.c) $(SRCS:M*.s) MAKEDEPEND
  1936. d214 8
  1937. a221 3
  1938. clean            :: .NOEXPORT
  1939.     $(RM) -f $(CLEANOBJS) $(CLEANOBJS:S/.o$/.po/g) $(TM).md/$(MODULE).o \
  1940.         $(TM).md/$(MODULE).po *~ $(TM).md/*~
  1941. d223 5
  1942. a232 2
  1943. mkmf makemake    :: .NOTMAIN    # Does nothing. Says nothing
  1944.  
  1945. a250 2
  1946.     
  1947.  
  1948. @
  1949.  
  1950.  
  1951. 1.41
  1952. log
  1953. @added TM variable after -m flag passed to lint
  1954. @
  1955. text
  1956. @d33 1
  1957. a33 1
  1958. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.40 88/11/05 16:38:31 douglis Exp Locker: jhh $ SPRITE (Berkeley)
  1959. d118 1
  1960. a118 1
  1961. LINTFLAGS    ?= -S -n -u -m$(TM)
  1962. @
  1963.  
  1964.  
  1965. 1.40
  1966. log
  1967. @added .NOEXPORT to make clean.
  1968. @
  1969. text
  1970. @d33 1
  1971. a33 1
  1972. # $Header: /sprite/lib/pmake/RCS/kernel.mk,v 1.39 88/10/31 12:41:12 mendel Exp Locker: douglis $ SPRITE (Berkeley)
  1973. d118 1
  1974. a118 1
  1975. LINTFLAGS    ?= -S -n -u -m
  1976. @
  1977.  
  1978.  
  1979. 1.39
  1980. log
  1981. @Switch to use the new include and c library.
  1982. @
  1983. text
  1984. @d33 1
  1985. a33 1
  1986. # $Header: kernel.mk,v 1.38 88/08/26 15:14:56 ouster Exp $ SPRITE (Berkeley)
  1987. d225 1
  1988. a225 1
  1989. clean            ::
  1990. d243 1
  1991. a243 1
  1992. Rdist        ::
  1993. @
  1994.  
  1995.  
  1996. 1.38
  1997. log
  1998. @Change line width back, just for compatibility.
  1999. @
  2000. text
  2001. @d33 1
  2002. a33 1
  2003. # $Header: kernel.mk,v 1.37 88/08/26 14:35:47 ouster Exp $ SPRITE (Berkeley)
  2004. d55 1
  2005. d58 5
  2006. d64 1
  2007. d76 5
  2008. a81 1
  2009. CC        ?= /sprite/cmds/cc
  2010. @
  2011.  
  2012.  
  2013. 1.37
  2014. log
  2015. @Switch to use newly-installed version of makedepend.
  2016. @
  2017. text
  2018. @d33 1
  2019. a33 1
  2020. # $Header: kernel.mk,v 1.36 88/08/23 22:34:09 douglis Exp $ SPRITE (Berkeley)
  2021. d143 1
  2022. a143 1
  2023.     $(MAKEDEPEND) $(CFLAGS:M-[ID]*) -m $(TM) -w60 -f $(DEPFILE) $(.ALLSRC)
  2024. @
  2025.  
  2026.  
  2027. 1.36
  2028. log
  2029. @added -m flag to LINTFLAGS to keep lint from complaining
  2030. about identical multiple declarations.
  2031. @
  2032. text
  2033. @d33 1
  2034. a33 1
  2035. # $Header: kernel.mk,v 1.35 88/08/23 16:39:47 douglis Exp $ SPRITE (Berkeley)
  2036. d77 1
  2037. a77 1
  2038. MAKEDEPEND    ?= /sprite/cmds/makedepend
  2039. d143 1
  2040. a143 1
  2041.     $(MAKEDEPEND) $(CFLAGS:M-[ID]*) -w50 -f $(DEPFILE) $(.ALLSRC)
  2042. @
  2043.  
  2044.  
  2045. 1.35
  2046. log
  2047. @moved LINTLIBS to come before CSRCS for lint, at Adam's
  2048. suggestion.
  2049. @
  2050. text
  2051. @d33 1
  2052. a33 1
  2053. # $Header: kernel.mk,v 1.34 88/08/20 09:55:39 ouster Exp $ SPRITE (Berkeley)
  2054. d107 1
  2055. a107 1
  2056. LINTFLAGS    ?= -S -n -u
  2057. @
  2058.  
  2059.  
  2060. 1.34
  2061. log
  2062. @Added lint flags -n and -u to work properly with kernel modules.
  2063. @
  2064. text
  2065. @d33 1
  2066. a33 1
  2067. # $Header: kernel.mk,v 1.33 88/08/19 15:50:37 ouster Exp $ SPRITE (Berkeley)
  2068. d205 1
  2069. a205 1
  2070. $(TM).md/lint        : $(CSRCS) $(HDRS) $(LINTLIBS) 
  2071. @
  2072.  
  2073.  
  2074. 1.33
  2075. log
  2076. @Switch back once again to new cpp, using "$" switch (hopefully) to
  2077. make everything finally work.
  2078. @
  2079. text
  2080. @d33 1
  2081. a33 1
  2082. # $Header: kernel.mk,v 1.32 88/08/18 15:52:27 ouster Exp $ SPRITE (Berkeley)
  2083. d107 1
  2084. a107 1
  2085. LINTFLAGS    ?= -S
  2086. @
  2087.  
  2088.  
  2089. 1.32
  2090. log
  2091. @Switch over to use new cpp.
  2092. @
  2093. text
  2094. @d33 1
  2095. a33 1
  2096. # $Header: kernel.mk,v 1.31 88/08/18 15:20:14 ouster Exp $ SPRITE (Berkeley)
  2097. d72 1
  2098. a72 1
  2099. CPP        ?= $(BINDIR)/cpp -traditional
  2100. @
  2101.  
  2102.  
  2103. 1.31
  2104. log
  2105. @Use new update, use current time when installing headers.
  2106. @
  2107. text
  2108. @d33 1
  2109. a33 1
  2110. # $Header: kernel.mk,v 1.30 88/08/12 10:56:09 ouster Exp $ SPRITE (Berkeley)
  2111. d72 1
  2112. a72 1
  2113. CPP        ?= /sprite/lib/cpp
  2114. @
  2115.  
  2116.  
  2117. 1.30
  2118. log
  2119. @Changed CCFLAGS -> XCFLAGS, CAFLAGS -> XAFLAGS.
  2120. @
  2121. text
  2122. @d33 1
  2123. a33 1
  2124. # $Header: kernel.mk,v 1.29 88/08/12 10:54:08 brent Exp $ SPRITE (Berkeley)
  2125. d83 1
  2126. a83 1
  2127. UPDATE        ?= /sprite/cmds/update -i
  2128. d197 1
  2129. a197 1
  2130.     @@$(UPDATE) -l $(PUBHDRS) $(INCLUDEDIR)
  2131. d200 1
  2132. a200 1
  2133.     @@$(UPDATE) -l $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  2134. @
  2135.  
  2136.  
  2137. 1.29
  2138. log
  2139. @Added rcssnapshot stuff
  2140. @
  2141. text
  2142. @d33 1
  2143. a33 1
  2144. # $Header: kernel.mk,v 1.28 88/08/11 11:12:18 douglis Exp $ SPRITE (Berkeley)
  2145. d89 2
  2146. a90 2
  2147. #ifdef        CCFLAGS
  2148. PASSVARS    += 'CCFLAGS=$(CCFLAGS)'
  2149. d92 2
  2150. a93 2
  2151. #ifdef        CAFLAGS
  2152. PASSVARS    += 'CAFLAGS=$(CAFLAGS)'
  2153. d104 2
  2154. a105 2
  2155. CCFLAGS        ?=
  2156. CAFLAGS        ?=
  2157. d108 2
  2158. a109 2
  2159. CFLAGS        += $(TMCFLAGS) -DKERNEL -I. $(.INCLUDES) $(.LIBS) $(CCFLAGS)
  2160. AFLAGS        += $(TMAFLAGS) $(CAFLAGS)
  2161. @
  2162.  
  2163.  
  2164. 1.28
  2165. log
  2166. @start at rcssnapshot addn., turning over to brent.
  2167. @
  2168. text
  2169. @d33 1
  2170. a33 1
  2171. # $Header: kernel.mk,v 1.27 88/08/05 10:15:06 ouster Exp $ SPRITE (Berkeley)
  2172. d237 2
  2173. d240 3
  2174. a242 1
  2175.     rcssnapshot ${SNAPVERSION} ${SNAPFLAGS} 
  2176. d244 1
  2177. a244 1
  2178.     
  2179. @
  2180.  
  2181.  
  2182. 1.27
  2183. log
  2184. @Backup to /sprite/lib/cpp again;  gcc cpp can't handle "#" chars.
  2185. in the middle of lines.
  2186. @
  2187. text
  2188. @d33 1
  2189. a33 1
  2190. # $Header: kernel.mk,v 1.26 88/08/01 16:31:01 ouster Exp $ SPRITE (Berkeley)
  2191. d236 5
  2192. @
  2193.  
  2194.  
  2195. 1.26
  2196. log
  2197. @Add -DKERNEL to CFLAGS.
  2198. @
  2199. text
  2200. @d33 1
  2201. a33 1
  2202. # $Header: kernel.mk,v 1.25 88/07/27 17:44:13 nelson Exp $ SPRITE (Berkeley)
  2203. d72 1
  2204. a72 1
  2205. CPP        ?= $(BINDIR)/cpp
  2206. @
  2207.  
  2208.  
  2209. 1.25
  2210. log
  2211. @Fixed bug with CPP.
  2212. @
  2213. text
  2214. @d33 1
  2215. a33 1
  2216. # $Header: kernel.mk,v 1.24 88/07/27 17:35:56 ouster Exp $ SPRITE (Berkeley)
  2217. d108 1
  2218. a108 1
  2219. CFLAGS        += $(TMCFLAGS) -I. $(.INCLUDES) $(.LIBS) $(CCFLAGS)
  2220. @
  2221.  
  2222.  
  2223. 1.24
  2224. log
  2225. @Switch over to use new binary directory.
  2226. @
  2227. text
  2228. @d33 1
  2229. a33 1
  2230. # $Header: kernel.mk,v 1.23 88/07/26 11:36:58 douglis Exp $ SPRITE (Berkeley)
  2231. d72 1
  2232. a72 1
  2233. CPP        ?= $(BINDIR)cpp
  2234. @
  2235.  
  2236.  
  2237. 1.23
  2238. log
  2239. @added /sprite/lib/include/$(TM).md to search path to get
  2240. dev to compile.
  2241. @
  2242. text
  2243. @d33 1
  2244. a33 1
  2245. # $Header: kernel.mk,v 1.22 88/07/05 17:03:41 mendel Exp $ SPRITE (Berkeley)
  2246. d36 1
  2247. a36 1
  2248. BINDIR        ?= /sprite/cmds
  2249. d69 2
  2250. a70 2
  2251. AS        ?= $(BINDIR)/as
  2252. CC        ?= $(BINDIR)/cc
  2253. d72 1
  2254. a72 1
  2255. CPP        ?= /sprite/lib/cpp
  2256. d74 1
  2257. a74 1
  2258. LD        ?= $(BINDIR)/ld
  2259. d77 1
  2260. a77 1
  2261. MAKEDEPEND    ?= $(BINDIR)/makedepend
  2262. d83 1
  2263. a83 1
  2264. UPDATE        ?= $(BINDIR)/update -i
  2265. @
  2266.  
  2267.  
  2268. 1.22
  2269. log
  2270. @Added machine dependent lint library support.
  2271. @
  2272. text
  2273. @d33 1
  2274. a33 1
  2275. # $Header: kernel.mk,v 1.21 88/07/02 12:12:26 ouster Exp $ SPRITE (Berkeley)
  2276. d57 1
  2277. a57 1
  2278.             /sprite/lib/include
  2279. @
  2280.  
  2281.  
  2282. 1.21
  2283. log
  2284. @Add "-S" lint flag.
  2285. @
  2286. text
  2287. @d33 1
  2288. a33 1
  2289. # $Header: kernel.mk,v 1.20 88/06/28 12:01:34 douglis Exp $ SPRITE (Berkeley)
  2290. d40 1
  2291. a40 1
  2292. LINTDIR        ?= ../Lint
  2293. d169 1
  2294. a169 1
  2295. llib-l$(MODULE).ln    : $(CSRCS) $(HDRS)
  2296. d171 1
  2297. d173 1
  2298. d175 1
  2299. a175 1
  2300. $(LINTDIR)/$(MODULE).ln : llib-l$(MODULE).ln
  2301. d177 1
  2302. a177 1
  2303.     $(CP) llib-l$(MODULE).ln $(.TARGET)
  2304. @
  2305.  
  2306.  
  2307. 1.20
  2308. log
  2309. @clear PATH.ln before putting in kernel lint directory,
  2310. so pmake finds the kernel libc lint library instead of the user one.
  2311. @
  2312. text
  2313. @d33 1
  2314. a33 1
  2315. # $Header: kernel.mk,v 1.19 88/06/25 18:28:05 ouster Exp $ SPRITE (Berkeley)
  2316. d107 1
  2317. a107 1
  2318. LINTFLAGS    ?=
  2319. @
  2320.  
  2321.  
  2322. 1.19
  2323. log
  2324. @Use relative path names instead of absolute for installation
  2325. (otherwise can't have multiple copies of kernel source tree).
  2326. @
  2327. text
  2328. @d33 1
  2329. a33 1
  2330. # $Header: kernel.mk,v 1.18 88/06/21 17:47:47 ouster Exp $ SPRITE (Berkeley)
  2331. d58 1
  2332. @
  2333.  
  2334.  
  2335. 1.18
  2336. log
  2337. @Typo in last "fix".
  2338. @
  2339. text
  2340. @d33 1
  2341. a33 1
  2342. # $Header: kernel.mk,v 1.17 88/06/21 17:46:33 ouster Exp $ SPRITE (Berkeley)
  2343. d37 5
  2344. a41 5
  2345. INCLUDEDIR    ?= /sprite/src/kernel/Include
  2346. INSTALLDIR    ?= /sprite/src/kernel/Installed/$(MODULE)
  2347. LIBDIR        ?= /sprite/src/kernel/$(TM).md
  2348. LINTDIR        ?= /sprite/src/kernel/Lint
  2349. PROFDIR        ?= /sprite/src/kernel/Profiled/$(TM).md
  2350. @
  2351.  
  2352.  
  2353. 1.17
  2354. log
  2355. @Include header files in lint dependencies.
  2356. @
  2357. text
  2358. @d33 1
  2359. a33 1
  2360. # $Header: kernel.mk,v 1.16 88/06/21 17:33:48 douglis Exp $ SPRITE (Berkeley)
  2361. d204 1
  2362. a204 1
  2363.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(ALLSRC:N*.h) \
  2364. @
  2365.  
  2366.  
  2367. 1.16
  2368. log
  2369. @undid the lint change since it wasn't really doing the right
  2370. thing...
  2371. @
  2372. text
  2373. @d33 1
  2374. a33 1
  2375. # $Header: kernel.mk,v 1.15 88/06/21 17:17:42 douglis Exp $ SPRITE (Berkeley)
  2376. d202 1
  2377. a202 1
  2378. $(TM).md/lint        : $(CSRCS) $(LINTLIBS) 
  2379. d204 2
  2380. a205 1
  2381.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(ALLSRC) > $(.TARGET) 2>& 1
  2382. @
  2383.  
  2384.  
  2385. 1.15
  2386. log
  2387. @look for mach.ln, not sun.ln.  Make lint depend on header files
  2388. but don't lint them in (so ALLSRC -> CSRCS + LINTLIBS).
  2389. @
  2390. text
  2391. @d33 1
  2392. a33 1
  2393. # $Header: kernel.mk,v 1.14 88/06/17 14:52:55 ouster Exp $ SPRITE (Berkeley)
  2394. d202 1
  2395. a202 1
  2396. $(TM).md/lint        : $(CSRCS) $(HDRS) $(LINTLIBS) 
  2397. d204 1
  2398. a204 1
  2399.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(CSRCS) $(LINTLIBS) > $(.TARGET) 2>& 1
  2400. @
  2401.  
  2402.  
  2403. 1.14
  2404. log
  2405. @Pass flags to sub-makes.
  2406. @
  2407. text
  2408. @d33 1
  2409. a33 1
  2410. # $Header: kernel.mk,v 1.13 88/06/17 08:33:54 ouster Exp $ SPRITE (Berkeley)
  2411. d202 1
  2412. a202 1
  2413. $(TM).md/lint        : $(CSRCS) $(LINTLIBS) 
  2414. d204 1
  2415. a204 1
  2416.     $(LINT) $(LINTFLAGS) $(CFLAGS:M-[ID]*) $(.ALLSRC) > $(.TARGET) 2>& 1
  2417. @
  2418.  
  2419.  
  2420. 1.13
  2421. log
  2422. @Documentation updates.
  2423. @
  2424. text
  2425. @d33 1
  2426. a33 1
  2427. # $Header: kernel.mk,v 1.12 88/06/15 17:13:55 ouster Exp $ SPRITE (Berkeley)
  2428. d87 1
  2429. a87 1
  2430. PASSVARS    = 'INSTALLDIR=$(INSTALLDIR)'
  2431. @
  2432.  
  2433.  
  2434. 1.12
  2435. log
  2436. @Don't pass CC to sub-makes:  must be determined based on machine type.
  2437. @
  2438. text
  2439. @d13 4
  2440. a16 1
  2441. #    PUBHDRS        publicly-available headers for the module
  2442. d33 1
  2443. a33 1
  2444. # $Header: kernel.mk,v 1.11 88/06/15 15:24:45 ouster Exp $ SPRITE (Berkeley)
  2445. @
  2446.  
  2447.  
  2448. 1.11
  2449. log
  2450. @Allow POBJS to be overridden.
  2451. @
  2452. text
  2453. @d30 1
  2454. a30 1
  2455. # $Header: kernel.mk,v 1.10 88/06/13 16:39:21 ouster Exp $ SPRITE (Berkeley)
  2456. d84 1
  2457. a84 1
  2458. PASSVARS    = 'CC=$(CC)' 'INSTALLDIR=$(INSTALLDIR)'
  2459. @
  2460.  
  2461.  
  2462. 1.10
  2463. log
  2464. @Use "-i" switch to update.
  2465. @
  2466. text
  2467. @d30 1
  2468. a30 1
  2469. # $Header: kernel.mk,v 1.9 88/06/08 08:29:21 ouster Exp $ SPRITE (Berkeley)
  2470. d40 6
  2471. a45 6
  2472. CSRCS        = $(SRCS:M*.c)
  2473. SSRCS        = $(SRCS:M*.s)
  2474. POBJS        = $(OBJS:S/.o$/.po/g)
  2475. ALLCSRCS    = $(ALLSRCS:M*.c)
  2476. MDHDRS        = $(HDRS:M*.md/*)
  2477. MDSRCS        = $(SRCS:M*.md/*)
  2478. @
  2479.  
  2480.  
  2481. 1.9
  2482. log
  2483. @For update to copy contents of symbolic links, not links themselves.
  2484. Also set up search path for .s files.
  2485. @
  2486. text
  2487. @d30 1
  2488. a30 1
  2489. # $Header: kernel.mk,v 1.8 88/06/06 17:22:49 ouster Exp $ SPRITE (Berkeley)
  2490. d79 1
  2491. a79 1
  2492. UPDATE        ?= $(BINDIR)/update
  2493. @
  2494.  
  2495.  
  2496. 1.8
  2497. log
  2498. @Modify to have machine-dependent installation directories too.
  2499. @
  2500. text
  2501. @d30 1
  2502. a30 1
  2503. # $Header: kernel.mk,v 1.7 88/06/05 17:47:58 ouster Exp $ SPRITE (Berkeley)
  2504. d58 2
  2505. d185 1
  2506. a185 1
  2507.     @@$(UPDATE) $(SRCS:N*.md/*) $(HDRS:N*.md/*) $(INSTALLDIR)
  2508. d188 1
  2509. a188 1
  2510.     @@$(UPDATE) $(MDSRCS) $(MDHDRS) $(INSTALLDIR)/$(TM).md
  2511. d191 1
  2512. a191 1
  2513.     @@$(UPDATE) $(PUBHDRS) $(INCLUDEDIR)
  2514. d194 1
  2515. a194 1
  2516.     @@$(UPDATE) $(MDPUBHDRS) $(INCLUDEDIR)/$(TM).md
  2517. @
  2518.  
  2519.  
  2520. 1.7
  2521. log
  2522. @Was missing headers in .md directories.
  2523. @
  2524. text
  2525. @d30 1
  2526. a30 1
  2527. # $Header: kernel.mk,v 1.5 88/05/17 13:33:15 deboor Exp $ SPRITE (Berkeley)
  2528. d44 2
  2529. d53 2
  2530. a54 1
  2531. .PATH.h        : $(TM).md $(INCLUDEDIR) /sprite/lib/include
  2532. d72 1
  2533. d136 5
  2534. a140 5
  2535.     $(TOUCH) $(DEPFILE)
  2536.     $(MAKEDEPEND) $(CFLAGS:M-[ID]*) -w60 -f $(DEPFILE) $(.ALLSRC)
  2537.     $(MV) $(DEPFILE) $(DEPFILE).tmp
  2538.     $(SED) -e '/^#/!s|^\([^:]*\)\.o[     ]*:|$(TM).md/\1.po $(TM).md/&|' <$(DEPFILE).tmp > $(DEPFILE)
  2539.     $(RM) -f $(DEPFILE).tmp
  2540. d183 5
  2541. a187 1
  2542.     $(UPDATE) $(SRCS) $(INSTALLDIR)
  2543. d189 5
  2544. a193 2
  2545.     @@${UPDATE} ${PUBHDRS} ${INCLUDEDIR}
  2546.     @@${UPDATE} ${HDRS} ${INSTALLDIR}
  2547. d224 1
  2548. a224 1
  2549.     $(RDIST) ${DISTFLAGS} -f ${DISTFILE} -d DIR=`pwd`
  2550. @
  2551.  
  2552.  
  2553. 1.6
  2554. log
  2555. @Installed new Makefile stuff for kernel modules.
  2556. @
  2557. text
  2558. @d51 1
  2559. a51 1
  2560. .PATH.h        : $(INCLUDEDIR) /sprite/lib/include
  2561. @
  2562.  
  2563.  
  2564. 1.5
  2565. log
  2566. @Added tags rule
  2567. @
  2568. text
  2569. @d5 7
  2570. a11 3
  2571. #    CSRCS        all C-code sources for the module
  2572. #    SSRCS        all assembly-language sources for the module
  2573. #    SRCS        both.
  2574. d14 9
  2575. a22 10
  2576. #    DEFAULT        default machine type for which to create when
  2577. #            install, profile, lint or nothing is specified
  2578. #    MACHINES    the list of machine types for which the module can
  2579. #            be compiled. For each machine type <x> in this variable,
  2580. #            the following targets are created:
  2581. #            <x>        does a 'make' in <x>.md
  2582. #            lint<x>        does 'make lint' in <x>.md
  2583. #            profile<x>    does 'make profile' in <x>.md
  2584. #            install<x>    does 'make install' in <x>.md
  2585. #            instlint<x>    does 'make instlint' in <x>.md
  2586. d30 1
  2587. a30 2
  2588. # This makefile is structured in such a way that it is as easy as possible
  2589. # to add new machine types.
  2590. a31 7
  2591. # $Header: kernel.mk,v 1.4 88/04/29 18:33:34 deboor Exp $ SPRITE (Berkeley)
  2592. #
  2593. ALL        = $(MACHINES)
  2594. ALLLINT        = $(MACHINES:S/^/lint/g)
  2595. ALLPROF        = $(MACHINES:S/^/profile/g)
  2596. ALLINSTALL    = $(MACHINES:S/^/install/g)
  2597. ALLINSTLINT    = $(MACHINES:S/^/instlint/g)
  2598. d33 6
  2599. a38 4
  2600. INCLUDEDIR    = /sprite/src/kernel/Include
  2601. INSTALLDIR    = /sprite/src/kernel/Installed/$(MODULE)
  2602. LINTDIR        = /sprite/src/kernel/Lint
  2603. UPDATE        = /sprite/cmds/update
  2604. d40 4
  2605. a43 6
  2606. CTFLAGS        ?=
  2607. CCFLAGS        ?=
  2608. CAFLAGS        ?=
  2609. CFLAGS        += -m68010 $(.INCLUDES) $(.LIBS) $(CCFLAGS)
  2610. AFLAGS        += -m68010 $(CAFLAGS)
  2611. PASSVARS    = 'CCFLAGS=$(CCFLAGS)' 'CAFLAGS=$(CAFLAGS)'
  2612. d51 1
  2613. a51 1
  2614. .PATH.h        : $(INCLUDEDIR)
  2615. d53 2
  2616. d56 18
  2617. a73 1
  2618. .MAKEFLAGS    : -C
  2619. d76 1
  2620. a76 3
  2621. # .USE rules for making generic targets. MAKEDEFAULT recurses only to the
  2622. # default machine-dependent directory. MAKEALL recurses to all the
  2623. # machine-dependent directories.
  2624. d78 7
  2625. a84 6
  2626. MAKEDEFAULT    : .USE .MAKE
  2627.     (cd $(DEFAULT).md; $(MAKE) -l $(PASSVARS) $(.TARGET))
  2628. MAKEALL        : .USE .MAKE
  2629.     for i in $(ALL); do
  2630.         (cd $$i.md; $(MAKE) -l $(PASSVARS) $(.TARGET))
  2631.     done
  2632. d87 4
  2633. a90 1
  2634. # Generic targets
  2635. a91 5
  2636. default        :: $(DEFAULT)
  2637. install        :: installsrc install$(DEFAULT)
  2638. instlint lint    :: MAKEDEFAULT
  2639. profile        :: profile$(DEFAULT)
  2640. tags        :: MAKEDEFAULT
  2641. d93 8
  2642. d102 3
  2643. a104 1
  2644. # Global generics -- apply to all machine types
  2645. d106 16
  2646. a121 3
  2647. # installsrc        installs both source files and header files
  2648. # installhdrs        installs headers only.
  2649. # installobj        installs all object files
  2650. d123 58
  2651. a180 1
  2652. installhdrs    ::
  2653. a182 1
  2654. installhdrs    :: MAKEALL
  2655. d184 5
  2656. a188 4
  2657. installsrc    :: installhdrs
  2658. installsrc    ::    
  2659.     @@${UPDATE} ${SRCS} ${INSTALLDIR}
  2660. installsrc    :: MAKEALL
  2661. d190 3
  2662. a192 1
  2663. installobj    :: MAKEALL
  2664. d194 3
  2665. a196 3
  2666. depend clean    :: MAKEALL
  2667. clean        ::
  2668.     rm -f *~
  2669. d198 2
  2670. a199 5
  2671. mkmf        :: .MAKE
  2672.     for i in $(ALL);
  2673.     do 
  2674.         (cd $$i.md; mkmf && $(MAKE) -l $(PASSVARS) mkmf) 
  2675.     done
  2676. d201 4
  2677. d213 1
  2678. a213 1
  2679.     rdist ${DISTFLAGS} -f ${DISTFILE} -d DIR=`pwd`
  2680. d215 1
  2681. a215 22
  2682. #
  2683. # 'all' targets
  2684. #
  2685. all        :: $(ALL)
  2686. all-lint    :: $(ALLLINT)
  2687. all-prof    :: $(ALLPROF)
  2688. all-install    :: $(ALLINSTALL) installsrc
  2689. all-instlint    :: instlint
  2690.  
  2691.  
  2692. $(ALL)        :: .MAKE
  2693.     cd $(.TARGET).md; ${MAKE} -l $(PASSVARS)
  2694. $(ALLPROF)    :: .MAKE
  2695.     cd $(.TARGET:S/^profile//).md; $(MAKE) -l $(PASSVARS) profile
  2696. $(ALLINSTALL)    :: .MAKE
  2697.     cd $(.TARGET:S/^install//).md; $(MAKE) -l $(PASSVARS) install
  2698. $(ALLLINT)    :: .MAKE
  2699.     cd $(.TARGET:S/^lint//).md; $(MAKE) -l $(PASSVARS) lint
  2700.  
  2701.  
  2702.  
  2703.  
  2704. @
  2705.  
  2706.  
  2707. 1.4
  2708. log
  2709. @Added header
  2710. @
  2711. text
  2712. @d13 8
  2713. a20 1
  2714. #            be compiled.
  2715. d30 1
  2716. a30 1
  2717. # $Header$ SPRITE (Berkeley)
  2718. d80 1
  2719. a80 4
  2720.  
  2721. tags        : ${HDRS} ${CSRCS}
  2722.     rm -f tags
  2723.     ctags ${CTFLAGS} ${HDRS} ${CSRCS}
  2724. @
  2725.  
  2726.  
  2727. 1.3
  2728. log
  2729. @Adapted to *.md machine-dependent directories (instead of
  2730. Object.*) and figured out how to use a variable with a list of machines
  2731. so the including makefile can just set that and all will be well.
  2732. @
  2733. text
  2734. @d21 3
  2735. a23 2
  2736. # to add new machine types. The 'expr' command is used to extract the
  2737. # machine type of the target being made from the target's name. qv. expr(1).
  2738. @
  2739.  
  2740.  
  2741. 1.2
  2742. log
  2743. @Added command-line variables for passing flags to CC and AS
  2744. @
  2745. text
  2746. @d12 2
  2747. d24 5
  2748. a28 5
  2749. ALL        = sun2 sun3
  2750. ALLLINT        = lintsun2 lintsun3
  2751. ALLPROF        = profilesun2 profilesun3
  2752. ALLINSTALL    = installsun2 installsun3
  2753. ALLINSTLINT    = instlintsun2 instlintsun3
  2754. d52 1
  2755. d54 12
  2756. d70 1
  2757. a70 1
  2758. lint        :: lint$(DEFAULT)
  2759. a71 1
  2760. instlint    :: instlint$(DEFAULT)
  2761. d77 7
  2762. d87 1
  2763. d89 2
  2764. a90 1
  2765. installsrc    ! installhdrs .PRECIOUS
  2766. d92 1
  2767. d94 1
  2768. a94 1
  2769. installobj    :: $(ALLINSTALL)
  2770. d96 1
  2771. a96 8
  2772. calls        : ${CSRCS}
  2773.     /sprite/local/cmds/calls ${CFLAGS:M-[ID]*} ${CSRCS} > calls
  2774.  
  2775. depend clean    :: .MAKE
  2776.     for i in $(ALL);
  2777.     do 
  2778.         (cd Object.$$i; $(MAKE) -l $(PASSVARS) $(.TARGET))
  2779.     done
  2780. d100 1
  2781. a100 1
  2782. mkmf        ::
  2783. d103 1
  2784. a103 1
  2785.         (cd Object.$$i; mkmf && $(MAKE) -l $(PASSVARS) mkmf) 
  2786. d123 1
  2787. a123 1
  2788. all-instlint    :: $(ALLINSTLINT)
  2789. d127 5
  2790. a131 1
  2791.     cd Object.$(.TARGET); ${MAKE} -l $(PASSVARS)
  2792. d133 1
  2793. a133 19
  2794.     cd Object.$(.TARGET:S/^lint//); $(MAKE) -l $(PASSVARS) lint
  2795. $(ALLPROF)    :: .MAKE
  2796.     cd Object.$(.TARGET:S/^profile//); $(MAKE) -l $(PASSVARS) profile
  2797.  
  2798. #
  2799. # Following targets are those that need to be imitated for each new machine
  2800. # type (e.g. for "spur", need "${LINTDIR}/spur/${MODULE}.ln", "installspur",
  2801. # "installspurobj" and "instlintspur". In addition, the ALL* variables should
  2802. # be altered accordingly.
  2803. #
  2804. ${LINTDIR}/sun3/${MODULE}.ln ${LINTDIR}/sun2/${MODULE}.ln: ${CSRCS} .MAKE
  2805.     (cd Object.$(.TARGET:H:T); ${MAKE} -l $(PASSVARS) instlint)
  2806. installsun2    :: installsun2obj instlintsun2
  2807. installsun3    :: installsun3obj instlintsun3
  2808. installsun3obj installsun2obj    :: .MAKE
  2809.     (cd Object.$(.TARGET:S/^install//:S/obj$//); \
  2810.         ${MAKE} -l $(PASSVARS) installobj)
  2811. instlintsun2    :: ${LINTDIR}/sun2/${MODULE}.ln
  2812. instlintsun3    :: ${LINTDIR}/sun3/${MODULE}.ln
  2813. @
  2814.  
  2815.  
  2816. 1.1
  2817. log
  2818. @Initial revision
  2819. @
  2820. text
  2821. @d34 5
  2822. a38 2
  2823. CFLAGS        += -m68010 $(.INCLUDES) $(.LIBS)
  2824. AFLAGS        += -m68010
  2825. d76 4
  2826. a79 1
  2827.     for i in $(ALL); do (cd Object.$$i; $(MAKE) -l $(.TARGET)); done
  2828. d84 4
  2829. a87 1
  2830.     for i in $(ALL); do (cd Object.$$i; mkmf && $(MAKE) -l mkmf); done
  2831. d110 1
  2832. a110 1
  2833.     cd Object.$(.TARGET); ${MAKE} -l
  2834. d112 1
  2835. a112 1
  2836.     cd Object.$(.TARGET:S/^lint//); $(MAKE) -l lint
  2837. d114 1
  2838. a114 1
  2839.     cd Object.$(.TARGET:S/^profile//); $(MAKE) -l profile
  2840. d123 1
  2841. a123 1
  2842.     (cd Object.$(.TARGET:H:T); ${MAKE} -l instlint)
  2843. d127 2
  2844. a128 1
  2845.     (cd Object.$(.TARGET:S/^install//:S/obj$//); ${MAKE} -l installobj)
  2846. @
  2847.